Method, device, equipment and storage medium for obtaining information from report files
By entering the target problems and the report files to be analyzed into the preset multi-classification model, the problem of low efficiency in obtaining information from annual reports, financial reports and other resources is solved, and automated information acquisition is achieved, resources are saved, and efficiency is improved.
Patent Information
- Application Number
- CN202110650474.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-06-10
AI Technical Summary
The benefits of obtaining information from annual reports, financial reports and other resources in the prior art are inefficient, and it takes huge effort and resources to find the required information.
Provide a method for obtaining information of a report file. By obtaining the target problem and the corresponding report file to be analyzed, and inputting it into a preset multi-classification model, predicting the report file to be analyzed based on the model to obtain the prediction of the target problem. result.
It realizes automatic search for answers to target questions from the annual report, without human previewing all data, saving human and material resources and improving the benefits of information acquisition.
Smart Images

Figure CN113255818B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a method, device, equipment and storage medium for obtaining information from a report file. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies are applied in the financial field, but the financial industry also puts forward higher requirements on technology. For example, the financial industry also has higher requirements for information acquisition in reporting documents.
[0003] Due to the excellent information display capabilities of PDF files, more and more companies are currently using PDF format files to publish their annual reports, financial reports, etc. Due to the huge amount of data in annual reports, financial reports, etc., existing personnel need to spend a lot of effort and resources to find what they need from the annual reports, financial reports and other data, which leads to low efficiency in obtaining information from annual reports, financial reports and other resources. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for obtaining information from report files, aiming to solve the technical problem of low efficiency in obtaining information from resources such as annual reports and financial reports in the prior art.
[0005] To achieve the above purpose, the present application provides a method for obtaining information from a report file, the method comprising:
[0006] Obtain a target problem, and obtain a report file to be analyzed corresponding to the target problem;
[0007] Inputting the target problem and the report file to be analyzed into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem;
[0008] The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
[0009] Optionally, before the step of inputting the target problem and the target matrix into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem, the method includes:
[0010] The report file to be analyzed is parsed into a target file in a preset format, and a target matrix is obtained based on the target file in the preset format.
[0011] Optionally, the preset format is json format;
[0012] The step of parsing the report file to be analyzed into a target file in a preset format and obtaining a target matrix based on the target file in the preset format includes:
[0013] Parse the report file to be analyzed into a target file in json format;
[0014] Determine each block of the target file in the json format to perform matrix processing on the target file in the json format to obtain a target matrix.
[0015] Optionally, the step of determining each block of the target file in the json format to perform matrix processing on the target file in the json format to obtain a target matrix includes:
[0016] Partition the target file in JSON format according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain blocks of the target file in JSON format;
[0017] Determine the unit cells of each block, and determine the coordinates of the unit cells;
[0018] The coordinates of the unit cell are subjected to matrix transformation and matrix combination to obtain a target matrix.
[0019] Optionally, the step of determining the unit cells of the blocks and determining the coordinates of the unit cells includes:
[0020] Determine the unit cells of each block, and determine whether there is a preset special mark in the unit cells;
[0021] If there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell.
[0022] Optionally, before the step of inputting the target question and the report file to be analyzed into a preset multi-classification model, the method includes:
[0023] Acquire training data with preset answer labels, perform iterative training on a preset model to be trained, and determine whether the preset model to be trained after the iterative training meets a preset training completion condition, wherein the training data includes each preset question and a plurality of candidate answers corresponding to each preset question;
[0024] If the preset training completion condition is met, the target model obtained after the iterative training is set as the preset multi-classification model.
[0025] Optionally, the step of obtaining the target question and obtaining the report file to be analyzed corresponding to the target question includes:
[0026] When a voice command is detected, extracting a target enterprise name and a target question from the voice command;
[0027] Based on the target enterprise name, determine the file to be analyzed from the preset report file set;
[0028] The type of the target problem is determined, and a corresponding report file to be analyzed is extracted from the file to be analyzed based on the type of the target problem.
[0029] The present application also provides a device for obtaining information from a report file, the device comprising:
[0030] A first acquisition module is used to acquire a target problem and acquire a report file to be analyzed corresponding to the target problem;
[0031] An input module, used for inputting the target problem and the report file to be analyzed into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem;
[0032] The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
[0033] Optionally, the report file information acquisition device further includes:
[0034] The parsing module is used to parse the report file to be analyzed into a target file in a preset format, and obtain a target matrix based on the target file in the preset format.
[0035] Optionally, the preset format is json format;
[0036] The parsing module comprises:
[0037] A parsing unit, used for parsing the report file to be analyzed into a target file in json format;
[0038] The matrixing unit is used to determine each block of the target file in the json format, so as to perform matrix processing on the target file in the json format to obtain a target matrix.
[0039] Optionally, the matrix unit includes:
[0040] A partitioning subunit, used to partition the target file in the JSON format according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain blocks of the target file in the JSON format;
[0041] Determine subunits, used to determine unit units of each block and determine coordinates of the unit units;
[0042] A sub-unit is obtained, which is used to perform matrix transformation and matrix combination on the coordinates of the unit unit to obtain a target matrix.
[0043] Optionally, the determining subunit is used to implement:
[0044] Determine the unit cells of each block, and determine whether there is a preset special mark in the unit cells;
[0045] If there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell.
[0046] Optionally, the report file information acquisition device further includes:
[0047] A second acquisition module is used to acquire training data with preset answer labels, iteratively train a preset model to be trained, and determine whether the preset model to be trained after the iterative training meets a preset training completion condition, wherein the training data includes each preset question and multiple candidate answers corresponding to each preset question;
[0048] A setting module is used to set the target model obtained after iterative training as the preset multi-classification model if the preset training completion condition is met.
[0049] Optionally, the first acquisition module includes:
[0050] A detection unit, configured to extract a target enterprise name and a target question from the voice instruction when a voice instruction is detected;
[0051] A first determining unit, configured to determine a file to be analyzed from a preset report file set based on the target enterprise name;
[0052] The second determining unit is used to determine the type of the target problem, and extract a corresponding report file to be analyzed from the file to be analyzed based on the type of the target problem.
[0053] The present application also provides a device for acquiring information about report files, which is a physical node device. The device for acquiring information about report files comprises: a memory, a processor, and a program for a method for acquiring information about report files stored on the memory and executable on the processor. When the program for the method for acquiring information about report files is executed by the processor, the steps of the method for acquiring information about report files as described above can be implemented.
[0054] The present application also provides a storage medium, on which is stored a program for implementing the above-mentioned method for obtaining information from a report file. When the program for the method for obtaining information from a report file is executed by a processor, the steps of the above-mentioned method for obtaining information from a report file are implemented.
[0055] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned report file information acquisition method when executed by a processor.
[0056] The present application provides a method, device, equipment and storage medium for obtaining information from a report file. Compared with the prior art in which the required resources can only be found by directly reading all the annual reports, financial reports and other data, which results in low efficiency, in the present application, a target problem is obtained, and the report file to be analyzed corresponding to the target problem is obtained; the target problem and the report file to be analyzed are input into a preset multi-classification model, and the report file to be analyzed and the target problem are predicted and processed based on the preset multi-classification model to obtain the prediction result of the target problem; wherein the preset multi-classification model is obtained by iteratively training the preset model to be trained based on the training data with preset answer labels. In the present application, as long as the target problem is obtained and the report file to be analyzed corresponding to the target problem is obtained, the corresponding answer to the target problem, i.e., the prediction result, can be directly found from the report file to be analyzed based on the trained preset multi-classification model, i.e., in the present application, the answer to the target problem is automatically searched from the annual report without manually previewing all the large amounts of data, thereby saving human and material resources and improving the efficiency of obtaining information from data such as annual reports and financial reports. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 This is a flow chart of the first embodiment of the method for obtaining information from the report file of this application;
[0060] Figure 2 In the method for obtaining information of the report file of the present application, the report file to be analyzed is parsed into a target file of a preset format, and a detailed flow chart of the target matrix step is obtained based on the target file of the preset format;
[0061] Figure 3 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application;
[0062] Figure 4 This is a schematic diagram of the first scenario of the method for obtaining information from the report file of this application;
[0063] Figure 5 A schematic diagram of the second scenario of the method for obtaining information from the report file of this application.
[0064] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0065] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] The present application embodiment provides a method for obtaining information from a report file. In the first embodiment of the method for obtaining information from a report file of the present application, refer to Figure 1 , the method for obtaining information from the report file includes:
[0067] Step S10, obtaining a target problem, and obtaining a report file to be analyzed corresponding to the target problem;
[0068] Step S20, inputting the target problem and the report file to be analyzed into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem;
[0069] The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
[0070] The specific steps are as follows:
[0071] Step S10, obtaining a target problem, and obtaining a report file to be analyzed corresponding to the target problem;
[0072] In this embodiment, it should be noted that the method for obtaining information from a report file can be applied to a system for obtaining information from a report file, and the system for obtaining information from a report file is subordinate to an information obtaining device for a report file. For the system for obtaining information from a report file, a preset multi-classification model is built in, and the preset multi-classification model is a trained model. It should be noted that the preset multi-classification model can specifically be a preset multi-classification model that outputs whether the corresponding answer to an input question is a correct result.
[0073] Among them, for the input question, the corresponding correct answer can be one;
[0074] Or for input questions, there can be multiple correct answers.
[0075] The answer can be text or data. For example, if the question is "What is the carbon dioxide emission in 2019?", the answer can be a paragraph or a number in a table (such as Figure 5 shown).
[0076] Among them, based on the trained multi-classification model, each matrix of the report file is traversed in a certain way, and then each matrix is predicted to be the correct answer to a certain question (input question). If so, the prediction result of the correct answer is output. If not, the prediction result of the correct answer is output. For example, the prediction result of the correct answer can be 1, and the prediction result of the wrong answer can be 0.
[0077] In this embodiment, the specific application scenario may be:
[0078] The stock exchange needs to check the annual report or financial report of each company to check the development of an organization. Since there are many companies and a huge number of annual reports, it takes a huge amount of human and material resources, resulting in low efficiency.
[0079] Or the company directors need to check the company's annual report or financial report to check the company's operating status. However, the directors have limited time resources and it is difficult to understand the company's development and operating status in a timely manner due to the huge number of annual reports.
[0080] This embodiment adopts a question-answer approach as a whole to obtain the required information from annual reports, etc., that is, the question-answer approach is implemented through a trained preset multi-classification model to obtain the required information from annual reports, etc. Specifically, as long as a question is entered, the corresponding answer can be obtained from the annual report, which can be in a table or text form.
[0081] Among them, due to the excellent information display capabilities of PDF files, more and more companies are using PDF format files to publish their annual reports and financial reports.
[0082] Parsing existing annual report PDF files is difficult, that is, due to the huge number of annual reports, which are not suitable for human reading, so computers are needed to parse them in batches. During the computer batch parsing process, parsing errors are prone to occur. If parsing errors occur, information will be lost, or the content found is not what you need. In this application, the PDF format file can be parsed into a certain format, thereby avoiding parsing errors and further avoiding information loss.
[0083] In this embodiment, the target question is first obtained, wherein the method of obtaining the target question may be:
[0084] Method 1: If a voice command is detected, the voice information in the voice command is extracted, and the target question is obtained from the voice information;
[0085] Method 2: In this embodiment, an inquiry interface may also be provided to obtain the target question based on the information input on the inquiry interface.
[0086] In this embodiment, in the inquiry interface, corresponding target questions can be output for multiple companies at the same time. The target questions can be one or multiple. Specifically, for example, the stock exchange asks multiple companies a question, such as "How are the profits this year?", or the stock exchange asks multiple companies multiple questions, such as "How are the profits this year?" "How many people are there on the board of directors", etc.
[0087] After obtaining the target problem, obtain the report file to be analyzed corresponding to the target problem, wherein the report file to be analyzed is set in the file pool, that is, in this embodiment, the report file to be analyzed of each company is set in the file pool, and thus, it can be directly obtained according to the identification information carried by the target problem, or in this embodiment, the report file to be analyzed is in the file system corresponding to each company, and the corresponding report file to be analyzed is downloaded from the file system through the identification information carried by the target problem, or in this embodiment, after obtaining the target problem, the corresponding report file to be analyzed is downloaded from the Internet. It should be noted that, in this embodiment, the target problem carries the corresponding identification information, specifically, the corresponding target company identification and exchange identification, and thus, the corresponding report file to be analyzed can be obtained.
[0088] In this embodiment, the report file to be analyzed may specifically be: a financial report to be analyzed, or an annual report to be analyzed, etc., wherein the report file to be analyzed may be in a text format or a table format.
[0089] Step S20, inputting the target problem and the report file to be analyzed into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem;
[0090] The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
[0091] In this embodiment, a preset multi-classification model is pre-set, and the preset multi-classification model is obtained after iterative training of a preset model to be trained based on training data with preset answer labels, wherein the training data includes answers marked for each training question in a PDF file and organized in a certain format as a training set), wherein the preset model to be trained predicts whether the training matrix is the correct answer to a certain training question.
[0092] Since in this embodiment, the preset multi-classification model is a target model obtained after iterative training of the preset model to be trained based on the training data with preset answer labels, the report file to be analyzed and the target question can be predicted based on the preset multi-classification model to accurately obtain the prediction result of the target question, that is, after the target question and the report file to be analyzed are input into the preset multi-classification model, the report file to be analyzed and the target question are predicted based on the preset multi-classification model to obtain the prediction result of the target question (whether each matrix in the report file to be analyzed is the correct answer to the report file to be analyzed).
[0093] Before the step of inputting the target problem and the target matrix into a preset multi-classification model, and performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model to obtain a prediction result of the target problem, the method includes:
[0094] Step S01: parsing the report file to be analyzed into a target file in a preset format, and obtaining a target matrix based on the target file in the preset format.
[0095] In this embodiment, the report file to be analyzed is first parsed into a target file in a preset format, and a target matrix is obtained based on the target file in the preset format.
[0096] Wherein, if the preset format is json format;
[0097] The step of parsing the report file to be analyzed into a target file in a preset format and obtaining a target matrix based on the target file in the preset format includes:
[0098] Step A1, parsing the report file to be analyzed into a target file in json format;
[0099] In this embodiment, the report file to be analyzed is parsed into a target file in json format through open source software, that is, the parsing result of each page of PDF is output in json format, wherein each page of PDF can be a Json data, and the logical structure of Json includes blocks. Blocks are composed of many blocks (each page has multiple blocks), each block is composed of a lines, each lines is composed of many lines, and a line can be represented by a dictionary. The key of the dictionary is composed of dir (direction of text block), spans (small blocks or unit units), etc. Each span is composed of multiple spans, that is, span is the smallest expression unit or unit unit, wherein span has size (font size), font, color, text, bbox (xy coordinates), etc., as shown in detail. Figure 4 shown.
[0100] Step A2, determining each block of the target file in the json format, so as to perform matrix processing on the target file in the json format to obtain a target matrix.
[0101] In this embodiment, each block (which may be a block, a line, or a span) of the target file in the json format is determined. After determining each block of the target file in the json format, the target file in the json format is matrixed to obtain a target matrix.
[0102] The method for determining each block of the target file in the json format may be:
[0103] The type of the report file to be analyzed is determined, and each block of the target file in json format is determined according to the type of the report file to be analyzed. The type of the report file to be analyzed can be a text type or a table type.
[0104] Specifically, the step of determining each block of the target file in the json format to perform matrix processing on the target file in the json format to obtain a target matrix includes:
[0105] Step B1, partitioning the target file in JSON format according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain blocks of the target file in JSON format;
[0106] In this embodiment, the target file in json format is partitioned according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain each block of the target file in json format. For example, if the type of the report file to be analyzed is a text type, according to the preset paragraph partitioning rule, the content corresponding to a paragraph in a page text in PDF (or the content of a line) is used as a block to partition the target file in json format. If the type of the report file to be analyzed is a table type, according to the preset table partitioning rule, a table large unit or a regional unit in a table in PDF is used to partition the target file in json format to obtain each block of the target file in json format, such as Figure 5 Shown is a table cell.
[0107] Step B2, determining the unit cells of each block and determining the coordinates of the unit cells;
[0108] In this embodiment, after obtaining each block, the unit cell of each block is determined (can be determined based on the json format), and the coordinates of the unit cell are determined. For example, if the unit cell is "good", then the coordinates of the text "good" in the coordinate system are determined.
[0109] Step B3, performing matrix transformation and matrix combination on the coordinates of the unit cell to obtain a target matrix.
[0110] The coordinates of the unit cells are transformed into matrices and combined to obtain a target matrix, wherein the unit coordinates of the unit cells can be used as a row or a cell of the matrix, and then based on the unit coordinates of each unit cell, matrix combination or matrix splicing is performed, so that the table or text corresponding to the block can be organized in a matrix manner to obtain the target matrix. It should be noted that there are multiple pages in PDF, each page has multiple blocks, each block can be a target matrix, or a corresponding part of each block is the target matrix.
[0111] In this embodiment, it should be noted that the question needs to be determined first, and after the question is determined, a person needs to manually collect multiple answers to each question from the PDF file as labels.
[0112] In this embodiment, after obtaining the label, each matrix is traversed based on the preset model to be trained in a preset manner (each page of the PDF has been organized into multiple matrices), that is, multiple matrices are input into the preset model to be trained, and the multiple matrices are predicted to be the correct answer to a certain question, and the prediction accuracy is obtained. The parameters of the preset model to be trained are continuously adjusted based on the prediction accuracy until the target model, i.e., the preset multi-classification model, is obtained. In this embodiment, it is also possible to organize the collected training data according to each question-answer pair, train multiple preset multi-classification models, and then find the correct answer to each question from the test file PDF.
[0113] In this embodiment, after obtaining the preset multi-classification model, the target problem and the report file to be analyzed are input into the preset multi-classification model, and the report file to be analyzed and the target problem are predicted based on the preset multi-classification model to obtain the prediction result of the target problem.
[0114] The present application provides a method, device, equipment and storage medium for obtaining information from a report file. Compared with the prior art in which the required resources can only be found by directly reading all the annual reports, financial reports and other data, which results in low efficiency, in the present application, a target problem is obtained, and the report file to be analyzed corresponding to the target problem is obtained; the target problem and the report file to be analyzed are input into a preset multi-classification model, and the report file to be analyzed and the target problem are predicted and processed based on the preset multi-classification model to obtain the prediction result of the target problem; wherein the preset multi-classification model is obtained by iteratively training the preset model to be trained based on the training data with preset answer labels. In the present application, as long as the target problem is obtained and the report file to be analyzed corresponding to the target problem is obtained, the corresponding answer to the target problem, i.e., the prediction result, can be directly found from the report file to be analyzed based on the trained preset multi-classification model, i.e., in the present application, the answer to the target problem is automatically searched from the annual report without manually previewing all the large amounts of data, thereby saving human and material resources and improving the efficiency of obtaining information from data such as annual reports and financial reports.
[0115] Further, based on the first embodiment of the present application, another embodiment of the present application is provided. In this embodiment, the step of determining the unit cells of each block and determining the coordinates of the unit cells includes:
[0116] Step C1, determining the unit cells of each block, and determining whether there is a preset special mark in the unit cell;
[0117] In this embodiment, the unit cells of each block are also determined. Specifically, the unit cells of each block can be determined by coordinate position. After the unit cells of each block are determined, it is further determined whether there is a preset special mark in the unit cell, wherein the preset special mark can be a highlight mark or a color mark. The purpose of determining whether there is a preset special mark in the unit cell is to quickly identify the answer, wherein the method of determining whether there is a preset special mark in the unit cell is to identify it by calling a special mark recognition module.
[0118] Step C2: if there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell.
[0119] In this embodiment, if there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell. Since the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell instead of the entire content of the unit cell, resources can be saved, and the preset special marks are generally answer marks, thereby improving the recognition efficiency.
[0120] In this embodiment, by determining the unit cells of each block, it is determined whether there is a preset special mark in the unit cell; if there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell. In this embodiment, the recognition efficiency is improved.
[0121] Further, based on the first embodiment of the present application, another embodiment of the present application is provided. In this embodiment, the model to be explained is a face recognition model to be explained;
[0122] Before the step of determining the model to be explained based on the condition number of the model to be explained and the disturbance data and inputting the target problem and the report file to be analyzed into a preset multi-classification model, the method includes:
[0123] Step D1, obtaining training data with preset answer labels, iteratively training a preset model to be trained, and determining whether the preset model to be trained after the iterative training meets a preset training completion condition, wherein the training data includes each preset question and a plurality of candidate answers corresponding to each preset question;
[0124] Step D2: If the preset training completion condition is met, the target model obtained after iterative training is set as the preset multi-classification model.
[0125] In the present embodiment, it should be noted that the training data includes each preset question and multiple candidate answers corresponding to each preset question. Since the training data includes each preset question and multiple candidate answers corresponding to each preset question, rather than one candidate question and one candidate answer, the preset multi-classification model can be accurately obtained. In the present embodiment, training data with preset answer labels is obtained, and the preset model to be trained is iteratively trained to determine whether the preset model to be trained after the iterative training meets the preset training completion condition. If the preset training completion condition is met, the target model obtained after the iterative training is set to the preset multi-classification model. Therefore, the target model can be accurately obtained, wherein the preset training completion condition may be the convergence of the preset loss function or the reaching of the preset number of training times.
[0126] In this embodiment, by obtaining training data with preset answer labels, iterative training is performed on the preset model to be trained, and it is determined whether the preset model to be trained after iterative training meets the preset training completion condition, wherein the training data includes each preset question and multiple candidate answers corresponding to each preset question; if the preset training completion condition is met, the target model obtained after iterative training is set as the preset multi-classification model. In this embodiment, the preset multi-classification model is accurately obtained.
[0127] Further, based on the first embodiment of the present application, another embodiment of the present application is provided. In this embodiment,
[0128] The step of obtaining the target problem and obtaining the report file to be analyzed corresponding to the target problem includes:
[0129] Step E1, when a voice command is detected, extracting a target enterprise name and a target question from the voice command;
[0130] In this embodiment, the target question may be obtained by voice. In addition to obtaining the target question, the target company name is also obtained. The purpose of obtaining the target company name is to quickly obtain the file to be analyzed. Specifically, when a voice instruction is detected, the target company name and the target question are extracted from the voice instruction.
[0131] Step E2, based on the target enterprise name, determining the file to be analyzed from the preset report file set;
[0132] Step E3: determine the type of the target problem, and extract corresponding report files to be analyzed from the files to be analyzed based on the type of the target problem.
[0133] Based on the target enterprise name, the file to be analyzed is determined from a preset report file set, the type of the target problem is determined, and the corresponding report file to be analyzed is extracted from the file to be analyzed based on the type of the target problem. Specifically, if the type of the target problem is an annual report type, the corresponding annual report file to be analyzed is extracted from the file to be analyzed based on the type of the target problem; if the type of the target problem is a monthly report type, the corresponding monthly report file to be analyzed is extracted from the file to be analyzed based on the type of the target problem.
[0134] In this embodiment, when a voice command is detected, the target company name and the target question are extracted from the voice command; based on the target company name, the file to be analyzed is determined from a preset report file set; the type of the target question is determined, and the corresponding report file to be analyzed is extracted from the file to be analyzed based on the type of the target question. In this embodiment, the corresponding report file to be analyzed is quickly obtained, thereby laying the foundation for rapid analysis.
[0135] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0136] like Figure 3 As shown, the report file information acquisition device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0137] Optionally, the information acquisition device of the report file may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0138] Those skilled in the art will understand that Figure 3 The structure of the report file information acquisition device shown in the figure does not constitute a limitation on the report file information acquisition device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0139] like Figure 3 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, and an information acquisition program for report files. The operating system is a program that manages and controls the hardware and software resources of the information acquisition device for report files, and supports the operation of the information acquisition program for report files and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the information acquisition system for report files.
[0140] exist Figure 3 In the device for acquiring information of a report file shown, the processor 1001 is used to execute the program for acquiring information of a report file stored in the memory 1005 to implement the steps of any of the above-mentioned methods for acquiring information of a report file.
[0141] The specific implementation of the information acquisition device for the report file of the present application is basically the same as the various embodiments of the information acquisition method for the report file mentioned above, and will not be repeated here.
[0142] The present application also provides a device for obtaining information from a report file, the device comprising:
[0143] A first acquisition module is used to acquire a target problem and acquire a report file to be analyzed corresponding to the target problem;
[0144] An input module, used for inputting the target problem and the report file to be analyzed into a preset multi-classification model, performing prediction processing on the report file to be analyzed and the target problem based on the preset multi-classification model, and obtaining a prediction result of the target problem;
[0145] The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
[0146] Optionally, the report file information acquisition device further includes:
[0147] The parsing module is used to parse the report file to be analyzed into a target file in a preset format, and obtain a target matrix based on the target file in the preset format.
[0148] Optionally, the preset format is json format;
[0149] The parsing module comprises:
[0150] A parsing unit, used for parsing the report file to be analyzed into a target file in json format;
[0151] The matrixing unit is used to determine each block of the target file in the json format, so as to perform matrix processing on the target file in the json format to obtain a target matrix.
[0152] Optionally, the matrix unit includes:
[0153] A partitioning subunit, used to partition the target file in the JSON format according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain blocks of the target file in the JSON format;
[0154] Determine subunits, used to determine unit units of each block and determine coordinates of the unit units;
[0155] A sub-unit is obtained, which is used to perform matrix transformation and matrix combination on the coordinates of the unit unit to obtain a target matrix.
[0156] Optionally, the determining subunit is used to implement:
[0157] Determine the unit cells of each block, and determine whether there is a preset special mark in the unit cells;
[0158] If there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell.
[0159] Optionally, the report file information acquisition device further includes:
[0160] A second acquisition module is used to acquire training data with preset answer labels, iteratively train a preset model to be trained, and determine whether the preset model to be trained after the iterative training meets a preset training completion condition, wherein the training data includes each preset question and multiple candidate answers corresponding to each preset question;
[0161] A setting module is used to set the target model obtained after iterative training as the preset multi-classification model if the preset training completion condition is met.
[0162] Optionally, the first acquisition module includes:
[0163] A detection unit, configured to extract a target enterprise name and a target question from the voice instruction when a voice instruction is detected;
[0164] A first determining unit, configured to determine a file to be analyzed from a preset report file set based on the target enterprise name;
[0165] The second determining unit is used to determine the type of the target problem, and extract a corresponding report file to be analyzed from the file to be analyzed based on the type of the target problem.
[0166] The specific implementation of the information acquisition device for report files of the present application is basically the same as the embodiments of the information acquisition method for report files described above, and will not be described in detail here.
[0167] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of the information acquisition method of the report file described in any one of the above.
[0168] The specific implementation of the storage medium of the present application is basically the same as the embodiments of the information acquisition method of the above-mentioned report file, and will not be repeated here.
[0169] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned report file information acquisition method when executed by a processor.
[0170] The specific implementation of the computer program product of the present application is basically the same as the various embodiments of the method for obtaining information from the report file mentioned above, and will not be repeated here.
[0171] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0172] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0173] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0174] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for obtaining information from a report file, characterized in that: The method for obtaining information from the report file includes: Obtain a target problem, and obtain a report file to be analyzed corresponding to the target problem; Parse the report file to be analyzed into a target file in json format; Determine each block of the target file in the json format, perform matrix processing on each block of the target file, and obtain a target matrix; Input the target question and the report file to be analyzed into a preset multi-classification model, traverse the target matrix in the report file to be analyzed based on the preset multi-classification model, predict whether the target matrix is the correct answer to the target question, and obtain the prediction result of the target question; The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
2. The method for obtaining information from a report file according to claim 1, wherein: The step of determining each block of the target file in the json format, performing matrix processing on each block of the target file, and obtaining a target matrix includes: Partition the target file in JSON format according to a preset paragraph partitioning rule or a preset table partitioning rule to obtain blocks of the target file in JSON format; Determine the unit cells of each block, and determine the coordinates of the unit cells; The coordinates of the unit cell are subjected to matrix transformation and matrix combination to obtain a target matrix.
3. The method for obtaining information from a report file according to claim 2, wherein: The step of determining the unit cells of each block and determining the coordinates of the unit cells includes: Determine the unit cells of each block, and determine whether there is a preset special mark in the unit cells; If there is a preset special mark, the coordinates corresponding to the preset special mark are used as the coordinates of the unit cell.
4. The method for obtaining information from a report file according to claims 1 to 3, characterized in that: Before the step of inputting the target question and the report file to be analyzed into the preset multi-classification model, the method includes: Acquire training data with preset answer labels, perform iterative training on a preset model to be trained, and determine whether the preset model to be trained after the iterative training meets a preset training completion condition, wherein the training data includes each preset question and a plurality of candidate answers corresponding to each preset question; If the preset training completion condition is met, the target model obtained after the iterative training is set as the preset multi-classification model.
5. The method for obtaining information from a report file according to any one of claims 1 to 3, characterized in that: The step of obtaining the target problem and obtaining the report file to be analyzed corresponding to the target problem includes: When a voice command is detected, extracting a target enterprise name and a target question from the voice command; Based on the target enterprise name, determine the file to be analyzed from the preset report file set; The type of the target problem is determined, and a corresponding report file to be analyzed is extracted from the file to be analyzed based on the type of the target problem.
6. A device for acquiring information of a report file, characterized in that: The information acquisition device of the report file includes: A first acquisition module is used to acquire a target problem and acquire a report file to be analyzed corresponding to the target problem; A parsing module, the parsing module comprising: A parsing unit, used for parsing the report file to be analyzed into a target file in json format; A matrixing unit, used for determining each block of the target file in the JSON format, performing matrixing on each block of the target file to obtain a target matrix; An input module, used to input the target question and the report file to be analyzed into a preset multi-classification model, traverse the target matrix in the report file to be analyzed based on the preset multi-classification model, predict whether the target matrix is a correct answer to the target question, and obtain a prediction result of the target question; The preset multi-classification model is obtained by iteratively training a preset model to be trained based on training data with preset answer labels.
7. A report file information acquisition device, characterized in that: The report file information acquisition device comprises: a memory, a processor, and a program stored in the memory for implementing the report file information acquisition method. The memory is used to store a program for implementing a method for obtaining information from a report file; The processor is used to execute a program for implementing the method for obtaining information from a report file, so as to implement the steps of the method for obtaining information from a report file as claimed in any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores a program for implementing the method for obtaining information from a report file, and the program for implementing the method for obtaining information from a report file is executed by a processor to implement the steps of the method for obtaining information from a report file as claimed in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Voice data processing method and device
CN104580477A
Information extraction method based on machine reading understanding and related equipment thereof
CN111814466A
Systems and methods for table extraction in documents
US11010543B1