Abstract generation method, device, equipment and storage medium
By automatically extracting key parameters and values in financial financial documents and automatically generating summary with appropriate templates, the problem of how to efficiently extract key information in financial documents is solved, and the efficiency of summary generation is improved.
Patent Information
- Application Number
- CN202111098010.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2041-09-18
AI Technical Summary
How to automatically extract key information from detailed financial report documents as summary to improve the efficiency of summary generation.
By obtaining the target document, determining its type and its matching parameter set, extracting multiple parameters and their values, matching the target template, and generating a summary based on the template.
It realizes automatic extraction of key parameters and values in financial report documents, and automatically generates summary with appropriate templates, improving the efficiency of summary generation.
Smart Images

Figure CN113806522B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the field of natural language processing, deep learning and other artificial intelligence technologies, and especially to a summary generation method, device, equipment and storage medium. Background Art
[0002] Financial reports are common industry documents for listed companies in the financial field. Every financial company will publish quarterly, semi-annual, and annual financial reports as required. Financial reports are usually very detailed and rich. A company's financial report is usually hundreds of pages or more. How to extract key information from financial reports as a summary is crucial. Summary of the invention
[0003] The present disclosure provides a summary generation method, apparatus, device and storage medium.
[0004] According to a first aspect, a summary generation method is provided, comprising: obtaining a target document; determining, based on the type of the target document and a parameter set matching the type, a plurality of parameters included in the target document and values of the plurality of parameters; determining, based on the plurality of parameters, a target template matching the target document; and determining a summary of the target document based on the values of the plurality of parameters and the target template.
[0005] According to a second aspect, a summary generation device is provided, comprising: a document acquisition unit, configured to acquire a target document; a parameter determination unit, configured to determine, according to the type of the target document and a parameter set matching the type, a plurality of parameters included in the target document and values of the plurality of parameters; a template determination unit, configured to determine, according to the plurality of parameters, a target template matching the target document; and a summary generation unit, configured to determine a summary of the target document according to the values of the plurality of parameters and the target template.
[0006] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor is executed to enable the at least one processor to execute the method described in the first aspect.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method as described in the first aspect.
[0008] According to a fifth aspect, a computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0009] According to the technology disclosed in the present invention, parameters can be automatically extracted from the target document, and a suitable template can be matched to automatically generate a summary, thereby improving the efficiency of generating the summary.
[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0013] Figure 2 is a flowchart of an embodiment of a method for generating a summary according to the present disclosure;
[0014] Figure 3 is a schematic diagram of an application scenario of the summary generation method according to the present disclosure;
[0015] Figure 4 is a flowchart of another embodiment of the method for generating a summary according to the present disclosure;
[0016] Figure 5 is a structural schematic diagram of an embodiment of a summary generation device according to the present disclosure;
[0017] Figure 6 The block diagram is a block diagram of an electronic device for implementing the summary generation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0019] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0020] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of a summary generation method or a summary generation apparatus of the present disclosure can be applied.
[0021] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0022] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications, such as social platform applications, browser applications, etc., can be installed on terminal devices 101, 102, 103.
[0023] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, car computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0024] The server 105 may be a server that provides various services, such as a background server that generates summaries for documents provided on the terminal devices 101, 102, and 103. The background server may analyze the target document, obtain a summary, and feed the summary back to the terminal devices 101, 102, and 103.
[0025] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0026] It should be noted that the summary generation method provided in the embodiment of the present disclosure can be executed by the terminal devices 101, 102, 103, or by the server 105. Accordingly, the summary generation device can be set in the terminal devices 101, 102, 103, or in the server 105.
[0027] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0028] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for generating a summary according to the present disclosure. The method for generating a summary in this embodiment includes the following steps:
[0029] Step 201, obtaining a target document.
[0030] In this embodiment, the execution subject of the summary generation method can obtain the target document in various ways. For example, the execution subject can crawl financial reports or event statistics documents published by various companies from the Internet. Here, the target document can be a document containing multiple parameters and parameter values.
[0031] Step 202: Determine multiple parameters included in the target document and values of the multiple parameters according to the type of the target document and a parameter set matching the type.
[0032] After obtaining the target document, the execution subject can determine the type of the target document. The types of target documents may include financial reports, event statistics, and the like. The execution subject may analyze the text at a specific location of the target document to determine the type of the target document. For example, the execution subject may analyze the preface of a financial report to determine that the type of the target document is a financial report. The execution subject may obtain a parameter set that matches the above type. For example, a parameter set that matches a financial report may include: operating income, total profit, and the like. A parameter set that matches event statistics may include: three-point shooting percentage, number of shots, and the like. The execution subject may search for each parameter in the above parameter set in the target document to determine the parameters included in the target document. Then, the execution subject may also use a deep learning model and a KV (key-value) algorithm to determine the value of each parameter from the target document.
[0033] Step 203: Determine a target template that matches the target document based on multiple parameters.
[0034] The execution subject may also determine a target template that matches the target document according to multiple parameters in the target document. Here, the target template may be a template that includes the above multiple parameters. The target template may include multiple sentences, each sentence includes multiple word slots, and the execution subject may fill the multiple parameters and the values of the multiple parameters into the above multiple word slots.
[0035] Step 204: Determine a summary of the target document according to the values of the multiple parameters and the target template.
[0036] The execution subject may fill the values of the multiple parameters into the target template to obtain the summary of the target document, or the execution subject may generate a sentence including the values of the multiple parameters according to the sentence included in the target template to obtain the summary.
[0037] Continue to see Figure 3 , which shows a schematic diagram of an application scenario of the summary generation method according to the present disclosure. Figure 3 In the application scenario, the server 301 receives a financial report of a company, and the server 301 first extracts the core elements therein and determines the values of each core element. Then, the values of each core element are filled into the target template to obtain a summary of the financial report.
[0038] The summary generation method provided by the above-mentioned embodiment of the present disclosure can automatically extract parameters from the target document, match a suitable template, automatically generate a summary, and improve the generation efficiency of the summary.
[0039] Continue to see Figure 4 , which shows a process 400 of another embodiment of the summary generation method according to the present disclosure. Figure 4 As shown, the method of this embodiment may include the following steps:
[0040] Step 401, obtaining a target document.
[0041] Step 402: extract multiple candidate parameters included in the target document using at least one parameter extraction algorithm; determine the parameters included in the target document and the values of the multiple parameters according to the type of the target document, the parameter set matching the type, and the candidate parameters.
[0042] In this embodiment, the execution entity can use a variety of parameter extraction algorithms to extract multiple candidate parameters included in the target document. This is because different parameter extraction algorithms have different extraction accuracy for different types of parameters. Specifically, the above-mentioned parameter extraction algorithms may include deep language models, KV algorithms, table extraction, etc. Among them, the deep language model refers to the use of deep learning named entity recognition technology to extract fields such as operating profit, net profit, and operating income for parameters that appear in paragraphs. For parameters with relatively fixed and regular formats, such as company names, company stock numbers, and financial report release dates, the KV extraction algorithm is used to extract corresponding industry parameters. Some financial report elements appear in tables. For these elements, first determine whether the table is extracted based on the degree of matching between the table header and the element schema, and then extract the corresponding cell content.
[0043] Step 403: normalize multiple parameters.
[0044] In this embodiment, in order to unify parameters with the same meaning expressed differently, the above multiple parameters may be normalized, so that subsequent summary generation is more accurate.
[0045] Step 404, determine the target sentence matching each parameter from the preset sentence set; combine each target sentence to obtain a target template.
[0046] In this embodiment, the execution subject may obtain a set of statements in advance. Each statement in the above statement set includes at least one parameter. The execution subject may use a statement containing each parameter in the above multiple parameters as a target statement. Then, each target statement is combined to obtain a target template.
[0047] In this embodiment, the execution subject may also determine the target template in step 405:
[0048] Step 405: Determine a template containing multiple parameters as a target template from a preset template set.
[0049] In this embodiment, the execution subject may obtain a template set in advance. Each template in the template set may include multiple parameters. The execution subject may use the template in the template set including the multiple parameters as the target template.
[0050] Step 406, in response to determining that the target template includes an additional parameter other than the multiple parameters, calculate the value of the additional parameter according to the values of the multiple parameters; fill the values of the multiple parameters and the value of the additional parameter into the target template to obtain a summary of the target document.
[0051] In this embodiment, if the target template includes additional parameters in addition to the above multiple parameters, for example, the target document includes parameters A and B, and the target template includes parameters A, B, and C, then parameter C is an additional parameter. The execution subject can calculate the value of the additional parameter using the values of the multiple parameters according to the association relationship between the multiple parameters and the additional parameter. Then, the execution subject can fill the values of the multiple parameters and the value of the additional parameter into the target template to obtain the summary of the target document.
[0052] The summary generation method provided by the above-mentioned embodiment of the present disclosure can determine suitable target templates for different target documents, thereby making the obtained summary more accurate.
[0053] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a summary generation device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0054] like Figure 5 As shown, the summary generating device 500 of this embodiment includes: a document acquiring unit 501 , a parameter determining unit 502 , a template determining unit 503 and a summary generating unit 504 .
[0055] The document acquisition unit 501 is configured to acquire a target document.
[0056] The parameter determination unit 502 is configured to determine a plurality of parameters included in the target document and values of the plurality of parameters according to the type of the target document and a parameter set matching the type.
[0057] The template determination unit 503 is configured to determine a target template matching the target document according to multiple parameters.
[0058] The summary generating unit 504 is configured to determine a summary of the target document according to values of multiple parameters and the target template.
[0059] In some optional implementations of this embodiment, the template determination unit 503 may be further configured to: determine a target sentence matching each parameter from a preset sentence set; and combine each target sentence to obtain a target template.
[0060] In some optional implementations of this embodiment, the template determining unit 503 may be further configured to: determine a template including multiple parameters as a target template from a preset template set.
[0061] In some optional implementations of this embodiment, the summary generation unit 504 can be further configured to: in response to determining that the target template includes additional parameters other than multiple parameters, calculate the value of the additional parameter based on the values of the multiple parameters; fill the values of the multiple parameters and the value of the additional parameter into the target template to obtain a summary of the target document.
[0062] In some optional implementations of this embodiment, the apparatus 500 may further include: Figure 5 The parameter normalization unit not shown in the figure is configured to: normalize multiple parameters.
[0063] It should be understood that the units 501 to 505 recorded in the summary generating device 500 are respectively the same as those in the reference Figure 2 Therefore, the operations and features described above for the summary generation method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0064] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0065] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0066] Figure 6A block diagram of an electronic device 600 that performs a summary generation method according to an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0067] like Figure 6 As shown, the electronic device 600 includes a processor 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a memory 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An I / O interface (input / output interface) 605 is also connected to the bus 604.
[0068] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a memory 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0069] The processor 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 601 performs the various methods and processes described above, such as the summary generation method. For example, in some embodiments, the summary generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable storage medium, such as a memory 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the processor 601, one or more steps of the summary generation method described above may be performed. Alternatively, in other embodiments, the processor 601 may be configured to perform the summary generation method in any other appropriate manner (e.g., by means of firmware).
[0070] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0071] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. The above program code can be packaged into a computer program product. These program codes or computer program products can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor 601, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or completely on a remote machine or server.
[0072] In the context of the present disclosure, a machine-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable storage medium may be a machine-readable signal storage medium or a machine-readable storage medium. A machine-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0073] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0074] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0075] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server in a distributed system, or a server combined with a blockchain.
[0076] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0077] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A summary generation method, include: Get the target document; Determining, according to the type of the target document and a parameter set matching the type, a plurality of parameters included in the target document and values of the plurality of parameters, including: extracting a plurality of candidate parameters included in the target document using a plurality of parameter extraction algorithms; determining, according to the type of the target document, a parameter set matching the type and the plurality of candidate parameters, the plurality of parameters included in the target document and values of the plurality of parameters; Determining a target template matching the target document according to the multiple parameters; Determining a summary of the target document according to the values of the multiple parameters and the target template, including: in response to determining that the target template includes additional parameters other than the multiple parameters, calculating the values of the additional parameters according to the values of the multiple parameters; filling the values of the multiple parameters and the values of the additional parameters into the target template to obtain a summary of the target document.
2. The method according to claim 1, in, The step of determining a target template matching the target document according to the multiple parameters includes: Determine a target sentence matching each parameter from a preset sentence set; Combine the target sentences to get the target template.
3. The method according to claim 1, in, The step of determining a target template matching the target document according to the multiple parameters includes: From a preset template set, a template including the multiple parameters is determined as a target template.
4. The method according to any one of claims 1 to 3, in, The method further comprises: The multiple parameters are normalized.
5. A summary generating device, include: A document acquisition unit, configured to acquire a target document; a parameter determination unit, configured to determine a plurality of parameters included in the target document and values of the plurality of parameters according to a type of the target document and a parameter set matching the type; a template determination unit, configured to determine a target template matching the target document according to the plurality of parameters; a summary generating unit configured to determine a summary of the target document according to the values of the plurality of parameters and the target template; Wherein, the summary generation unit is further configured to: In response to determining that the target template includes an additional parameter other than the multiple parameters, calculating a value of the additional parameter according to the values of the multiple parameters; filling the values of the multiple parameters and the value of the additional parameter into the target template to obtain a summary of the target document; The parameter determination unit is further configured to: A plurality of candidate parameters included in the target document are extracted using a plurality of parameter extraction algorithms; and the plurality of parameters included in the target document and their values are determined according to the type of the target document, a parameter set matching the type, and the plurality of candidate parameters.
6. The device according to claim 5, in, The template determination unit is further configured to: Determine a target sentence matching each parameter from a preset sentence set; Combine the target sentences to get the target template.
7. The device according to claim 5, in, The template determination unit is further configured to: From a preset template set, a template including the multiple parameters is determined as a target template.
8. The device according to any one of claims 5 to 7, in, The apparatus further comprises a parameter normalization unit configured to: The multiple parameters are normalized.
9. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 4.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Abstract generation method and device, electronic equipment and medium
CN111552800A
Method and device for generating target article, equipment and readable storage medium
CN113361240A