Report generation method and device, equipment and storage medium
Through automated parsing and data filling technology, the influence of human subjective factors in traditional report writing is resolved, the standardization and consistency of reports are achieved, the generation efficiency and accuracy are improved, and labor costs are reduced.
Patent Information
- Application Number
- CN202510788568.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-19
AI Technical Summary
Traditional report writing relies on manual experience, which leads to deviations in data interpretation and difficulty in ensuring report accuracy. In addition, the lack of unified standards makes it difficult to achieve standardization and regularization, resulting in large differences in report content structure and analysis logic.
By parsing the target report template, obtaining the data to be extracted and its location, configuring the data source, automatically extracting the target data content from the corresponding data source, and filling it into the template to generate a business report, it uses multiple data source strategies such as HTTP, SQL, manual input and large models to achieve accurate data filling.
The generated report content structure and analysis logic follow unified standards, reducing data omissions caused by human negligence, improving the accuracy and completeness of the report, significantly reducing manpower input, and improving generation efficiency and quality.
Smart Images

Figure CN120671653A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology and provides a report generation method, apparatus, device and storage medium. Background Art
[0002] In the field of professional reporting, traditional manual report writing presents numerous challenges that need to be addressed. Currently, report writers must manually collect data from multiple sources before writing a report. This requires not only collecting micro-level data on specialized fields, such as detailed information on the financial status and operating conditions of companies in the financial sector, but also macro-level information covering industry development trends, policy and regulatory changes, and competitor dynamics. This massive and complex data, sourced from a wide range of sources and in varying formats, presents significant challenges in subsequent processing.
[0003] Because existing report writing relies heavily on the experience of business personnel, it is subject to significant human subjectivity. On the one hand, subjective judgment can lead to deviations in data interpretation and analysis, making it difficult to ensure report accuracy and severely reducing report usability. On the other hand, the involvement of subjective factors leads to a lack of unified standards for report writing, making standardization and regularization difficult. Consequently, reports produced by different writers vary significantly in content structure, analytical logic, and other aspects. Summary of the Invention
[0004] The embodiments of the present application provide a report generation method, apparatus, device, and storage medium to solve many problems caused by manual report writing.
[0005] In a first aspect, an embodiment of the present application provides a report generation method, comprising:
[0006] Parse the target report template uploaded by the object to obtain the data to be extracted and its location;
[0007] In response to the data extraction configuration operation triggered by the usage object, respectively configuring a data source for each of the data to be extracted;
[0008] The target data contents of each data to be extracted are extracted from the corresponding data sources respectively, and each target data content is filled into the corresponding position of the target report template to generate a business report.
[0009] Optionally, the parsing uses the target report template uploaded by the object to obtain each data to be extracted and its location, including:
[0010] Performing structural analysis on the target report template uploaded by the user object, obtaining an original element data set in a first data format, and converting the original element data set into a target element data set in a second data format;
[0011] The converted target element data set is traversed to extract element data matching the specified identifier and its location information in the target report template until the traversal is completed, thereby obtaining the data to be extracted and its location.
[0012] Optionally, the target data content of each to-be-extracted data is extracted from the corresponding data source respectively, wherein the following operations are performed for each to-be-extracted data:
[0013] When the data source is Hypertext Transfer Protocol (HTTP), based on the generated data extraction request, extracting target data content associated with the data to be extracted from the network;
[0014] When the data source is structured query language SQL, based on the generated data query request, extracting target data content associated with the data to be extracted from the database;
[0015] When the data source is manually input, obtaining target data content of the one to-be-extracted data manually input by the user;
[0016] When the data source is a large model, the target data content associated with the data to be extracted is extracted by analyzing the question statement.
[0017] Optionally, when the data source is a Hypertext Transfer Protocol (HTTP), extracting target data content associated with the data to be extracted from the network based on the generated data extraction request includes:
[0018] When the data source is HTTP, a data extraction request is generated based on the request address, request parameters, and request fields;
[0019] The data extraction request is sent to extract target data content associated with the data to be extracted from the network.
[0020] Optionally, when the data source is structured query language SQL, extracting target data content associated with the data to be extracted from the database based on the generated data query request includes:
[0021] When the data source is structured query language SQL, a data query request is generated;
[0022] The data query request is sent, structural data is extracted from at least one of the relational database and the graph database, and target data content associated with the data to be extracted is obtained.
[0023] Optionally, when the data source is a large model, extracting target data content associated with the data to be extracted by analyzing the question statement includes:
[0024] When the data source is a large model, analyzing the question statement, and when it is determined that the question statement requests the extraction of structured data, performing at least one of a data query through a database and a data analysis through the large model to obtain target data content associated with the data to be extracted;
[0025] When the data source is a large model, the question statement is analyzed. When it is determined that the question statement requests the extraction of unstructured data, keyword analysis is performed on the question statement, a first data set is retrieved, and the text features extracted from the question statement are matched with the pre-stored data features for similarity to obtain a second data set; a comprehensive score is performed on the first data set and the second data set based on the question statement, and a target data set with a score ranking greater than a set threshold is selected; the target data set is input into the large model in combination with a preset prompt word for data analysis to obtain the target data content associated with the data to be extracted.
[0026] Optionally, performing at least one of a data query through a database and a data analysis through a large model to obtain target data content associated with the data to be extracted includes:
[0027] Analyze the question statement by using a relational database and a graph database in knowledge retrieval to obtain a first analysis result;
[0028] Uploading the question sentence to the trained large model, and performing in-depth analysis by the large model to obtain a second analysis result;
[0029] At least one of the first analysis result and the second analysis result is used as target data content associated with the one piece of data to be extracted.
[0030] Optionally, after generating the business report, it also includes:
[0031] Recording the generation information of the business report and storing the business report;
[0032] In response to a viewing operation triggered by the usage object, the recorded generation information of the business report is displayed.
[0033] Optionally, after generating the business report, at least one of the following operations is also performed:
[0034] In response to a preview operation triggered by the usage object, viewing a report style and report content of the business report;
[0035] Re-editing report content of the business report in response to an editing operation triggered by the usage object;
[0036] In response to a download operation triggered by the usage object, the business report is downloaded to a designated storage location.
[0037] In a second aspect, an embodiment of the present application further provides a report generating device, comprising:
[0038] An acquisition unit, used to parse the target report template uploaded by the object and obtain the data to be extracted and its location;
[0039] A configuration unit, configured to configure a data source for each piece of data to be extracted in response to a data extraction configuration operation triggered by a usage object;
[0040] The generating unit is configured to extract target data contents of the data to be extracted from corresponding data sources respectively, and fill the target data contents into corresponding positions of the target report template to generate a business report.
[0041] Optionally, the acquiring unit is configured to:
[0042] Performing structural analysis on the target report template uploaded by the user object, obtaining an original element data set in a first data format, and converting the original element data set into a target element data set in a second data format;
[0043] The converted target element data set is traversed to extract element data matching the specified identifier and its location information in the target report template until the traversal is completed, thereby obtaining the data to be extracted and its location.
[0044] Optionally, the generating unit performs the following operations on a piece of data to be extracted:
[0045] When the data source is Hypertext Transfer Protocol (HTTP), based on the generated data extraction request, extracting target data content associated with the data to be extracted from the network;
[0046] When the data source is structured query language SQL, based on the generated data query request, extracting target data content associated with the data to be extracted from the database;
[0047] When the data source is manually input, obtaining target data content of the one to-be-extracted data manually input by the user;
[0048] When the data source is a large model, the target data content associated with the data to be extracted is extracted by analyzing the question statement.
[0049] Optionally, the generating unit is used to:
[0050] When the data source is HTTP, a data extraction request is generated based on the request address, request parameters, and request fields;
[0051] The data extraction request is sent to extract target data content associated with the data to be extracted from the network.
[0052] Optionally, the generating unit is used to:
[0053] When the data source is structured query language SQL, a data query request is generated;
[0054] The data query request is sent, structural data is extracted from at least one of the relational database and the graph database, and target data content associated with the data to be extracted is obtained.
[0055] Optionally, the generating unit is used to:
[0056] When the data source is a large model, analyzing the question statement, and when it is determined that the question statement requests the extraction of structured data, performing at least one of a data query through a database and a data analysis through the large model to obtain target data content associated with the data to be extracted;
[0057] When the data source is a large model, the question statement is analyzed. When it is determined that the question statement requests the extraction of unstructured data, keyword analysis is performed on the question statement, a first data set is retrieved, and the text features extracted from the question statement are matched with the pre-stored data features for similarity to obtain a second data set; a comprehensive score is performed on the first data set and the second data set based on the question statement, and a target data set with a score ranking greater than a set threshold is selected; the target data set is input into the large model in combination with a preset prompt word for data analysis to obtain the target data content associated with the data to be extracted.
[0058] Optionally, the generating unit is used to:
[0059] Analyze the question statement by using a relational database and a graph database in knowledge retrieval to obtain a first analysis result;
[0060] Uploading the question sentence to the trained large model, and performing in-depth analysis by the large model to obtain a second analysis result;
[0061] At least one of the first analysis result and the second analysis result is used as target data content associated with the one piece of data to be extracted.
[0062] Optionally, after generating the business report, the report generating device further includes an information viewing unit:
[0063] Recording the generation information of the business report and storing the business report;
[0064] In response to a viewing operation triggered by the usage object, the recorded generation information of the business report is displayed.
[0065] Optionally, after generating the business report, the report generating apparatus further includes a processing unit, which performs at least one of the following operations:
[0066] In response to a preview operation triggered by the usage object, viewing a report style and report content of the business report;
[0067] Re-editing report content of the business report in response to an editing operation triggered by the usage object;
[0068] In response to a download operation triggered by the usage object, the business report is downloaded to a designated storage location.
[0069] In a third aspect, an embodiment of the present application further provides a computer device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned report generation methods.
[0070] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium comprising a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of any one of the above-mentioned report generation methods.
[0071] The beneficial effects of this application are as follows:
[0072] An embodiment of the present application provides a report generation method, apparatus, device and storage medium, the method comprising: parsing a target report template uploaded by a usage object to obtain each data to be extracted and its location; in response to a data extraction configuration operation triggered by the usage object, configuring a data source for each data to be extracted; extracting the target data content of each data to be extracted from the corresponding data source, and filling the target data content into the corresponding position of the target report template to generate a business report.
[0073] According to the method provided in this application, the generated business report content follows unified standards in terms of content structure, analysis logic, etc., avoiding the problem of large differences in content structure, analysis logic, etc. in the traditional report writing method due to reports produced by different writers, greatly improving the standardization and consistency of the report content. The introduction of the automatic data filling mechanism can achieve accurate data filling operations based on the specified template location. This technology effectively reduces the workload of business personnel to manually fill in data, fundamentally avoids the problem of data omissions due to human negligence, greatly improves the accuracy and completeness of data filling, and lays a reliable data foundation for professional reports.
[0074] Automated and intelligent report filling significantly reduces manpower input and significantly saves manual writing time. With minimal human intervention, high-quality, standardized, and regulated business reports can be quickly generated, greatly improving the efficiency of professional report generation. This innovative approach effectively solves the problem of excessive human resource consumption in traditional report writing and reduces operating costs for enterprises.
[0075] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0077] Figure 1 This is an optional schematic diagram of an application scenario in an embodiment of the present application;
[0078] Figure 2A A schematic diagram of a report generation process provided in an embodiment of the present application;
[0079] Figure 2B A schematic diagram of a target report template after construction provided in an embodiment of the present application;
[0080] Figure 2C A schematic diagram of the process of analyzing the target report template provided in the embodiment of the present application;
[0081] Figure 2D A schematic diagram of the data extraction configuration interface provided in an embodiment of the present application;
[0082] Figure 2E Schematic diagram of the HTTP request configuration interface provided in an embodiment of the present application;
[0083] Figure 2F A schematic diagram of a generated business report provided in an embodiment of the present application;
[0084] Figure 3 A complete flowchart of the automated generation and processing of business reports provided in an embodiment of the present application;
[0085] Figure 4 A schematic diagram of the structure of a report generating device provided in an embodiment of the present application;
[0086] Figure 5A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0087] Figure 6 This is a schematic diagram of the structure of a computing device in an embodiment of the present application. DETAILED DESCRIPTION
[0088] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of the technical solutions of this application, but not all of them. Based on the embodiments described in this application document, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the technical solutions of this application.
[0089] The following is a brief introduction to the design concept of the embodiment of this application:
[0090] In the field of professional reporting, traditional manual report writing presents numerous challenges that need to be addressed. Currently, report writers must manually collect data from multiple sources before writing a report. This requires not only collecting micro-level data on specialized fields, such as detailed information on the financial status and operating conditions of companies in the financial sector, but also macro-level information covering industry development trends, policy and regulatory changes, and competitor dynamics. This massive and complex data, sourced from a wide range of sources and in varying formats, presents significant challenges in subsequent processing.
[0091] Because existing report writing relies heavily on the experience of business personnel, it is subject to significant human subjectivity. On the one hand, subjective judgment can lead to deviations in data interpretation and analysis, making it difficult to ensure report accuracy and severely reducing report usability. On the other hand, the involvement of subjective factors leads to a lack of unified standards for report writing, making standardization and regularization difficult. Consequently, reports produced by different writers vary significantly in content structure, analytical logic, and other aspects.
[0092] In view of this, embodiments of the present application provide a report generation method, apparatus, device, and storage medium. The method includes: parsing a target report template uploaded by a user to obtain each piece of data to be extracted and its location; in response to a data extraction configuration operation triggered by the user, configuring a data source for each piece of data to be extracted; extracting the target data content of each piece of data to be extracted from the corresponding data source, and populating the target data content into the corresponding location of the target report template to generate a business report.
[0093] According to the method provided in this application, the generated business report content follows unified standards in terms of content structure, analysis logic, etc., avoiding the problem of large differences in content structure, analysis logic, etc. in the traditional report writing method due to reports produced by different writers, greatly improving the standardization and consistency of the report content. The introduction of the automatic data filling mechanism can achieve accurate data filling operations based on the specified template location. This technology effectively reduces the workload of business personnel to manually fill in data, fundamentally avoids the problem of data omissions due to human negligence, greatly improves the accuracy and completeness of data filling, and lays a reliable data foundation for professional reports.
[0094] Automated and intelligent report filling significantly reduces manpower input and significantly saves manual writing time. With minimal human intervention, high-quality, standardized, and regulated business reports can be quickly generated, greatly improving the efficiency of professional report generation. This innovative approach effectively solves the problem of excessive human resource consumption in traditional report writing and reduces operating costs for enterprises.
[0095] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application can be combined with each other if there is no conflict.
[0096] The report generation method provided in the embodiment of the present application has a high degree of versatility and adaptability, and can be widely used in key scenarios in multiple fields. When applied to the financial field, it can quickly generate corporate financial analysis reports and investment feasibility study reports, automatically integrate corporate financial report data and industry economic indicators, and analyze risks and benefits through professional models. When applied to the medical industry, it is suitable for writing clinical research reports and case analysis reports, accurately processing patient diagnosis and treatment data and medical experimental results, and generating professional conclusions in combination with the medical knowledge base. When applied to the field of education, it can help produce teaching quality evaluation reports and student comprehensive quality analysis reports, efficiently summarize test scores and classroom performance data, and provide a basis for educational decision-making. When applied to the field of scientific research, it can assist in generating scientific research project progress reports and academic achievement summary reports, automatically organize experimental data and literature materials, and accelerate the transformation of scientific research results.
[0097] Regardless of the industry, as long as there is a need to write reports, this method can quickly generate high-quality, standardized, and normalized business reports through automated data processing and intelligent analysis with minimal human intervention, greatly improving the efficiency and quality of report generation, and solving the problems of excessive human resource consumption and high reliance on the experience of business personnel in the traditional report writing process.
[0098] Figure 1One application scenario is shown, which includes two terminal devices 110 and a server 130. The terminal device 110 establishes a communication connection with the server 130 via a wired network or a wireless network.
[0099] Among them, the terminal device 110 includes but is not limited to: mobile phones, computers (such as tablets, laptops, desktop computers, etc.), smart home appliances, smart voice interaction devices (such as smart watches, smart speakers, etc.), vehicle terminals, aircraft, etc.
[0100] The server 130 in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. This application does not impose any restrictions on this.
[0101] In response to a request triggered by the usage object, the terminal device 110 obtains a preset report template that meets the business requirements of the usage object and displays the report template on the display 120 of the terminal device 110. In response to other operations triggered by the usage object, the terminal device 110 reconstructs the preset report template to generate a target report template and uploads the reconstructed report template to the server 130 for report generation.
[0102] After receiving the target report template, server 130 uses a report generation system deployed locally on server 130, or invokes a report generation system deployed on another server, to parse the target report template uploaded by the user object and retrieve the data to be extracted and its location. In response to the data extraction configuration operation triggered by the user object, the report generation system configures a data source for each data item to be extracted, extracts the target data content of each data item from the corresponding data source, and populates the target data content into the corresponding location of the target report template to generate a business report.
[0103] The server 130 returns the corresponding business report to the terminal device 110, which loads the report content and ultimately displays the business report to the user via the display 120. In addition, the present application also provides users with comprehensive and convenient functions such as viewing report information, previewing, editing, and downloading. Users can trigger related functions through the terminal device 110 to fully meet their diverse needs.
[0104] This report generation system is composed of seven core modules that work together to automate the entire process from data interaction, retrieval, processing to report generation. The details are as follows:
[0105] (1) Page interaction module: Build a user interaction interface based on the Vue.js front-end framework, provide a smooth operation experience, and support efficient interaction between objects and the system.
[0106] (2) Template parsing module: It intelligently analyzes the report templates uploaded by the user, accurately filters the marked pre-filled data, and lays the foundation for subsequent data filling.
[0107] (3) Knowledge retrieval module: Differentiated retrieval strategies are adopted for different types of data. Unstructured data extraction is achieved using Elasticsearch, PostgreSQL, Embedding model and Rerank model. Structured data retrieval is completed through relational databases such as MySQL. In addition, efficient extraction of graph structured data is achieved with the help of Neo4j graph database.
[0108] (4) Knowledge base maintenance module: supports uploading knowledge files using objects, uses Minio for secure storage, and writes data to Elasticsearch and PostgreSQL through the Embedding model to achieve dynamic update and maintenance of the knowledge base.
[0109] (5) Large model question answering module: It integrates pre-trained large language models (LLM) such as QWen-32B, which can deeply understand the questions raised by users, provide accurate and professional summary answers, and assist in report content generation.
[0110] (6) Report filling module: Using the poi-tl tool, the filtered pre-filled data is accurately filled into the corresponding fields of the report template to efficiently generate complete report content.
[0111] (7) Report editing and preview module: provides report preview function and supports secondary editing, which facilitates the use of object verification content, ensures the accuracy and usability of the report, and meets diverse business needs.
[0112] Next, combine Figure 2A The schematic diagram shown introduces the specific implementation process of automatically generating reports.
[0113] S201: Parse the target report template uploaded by the object to obtain the data to be extracted and its location.
[0114] Before executing step 201, when the user triggers a report generation request by clicking a specific "Create Report" button or using a shortcut command on the terminal device's operation interface, the terminal device will immediately activate the intelligent matching mechanism. First, based on the user's pre-set business preference tags, historical usage records, and currently entered business requirement keywords, a quick search is performed in the local cache or remote database to filter out the preset report template that best meets the user's business needs from the massive library of preset report templates. These preset report templates cover a variety of types, including financial analysis, market research reports, project progress reports, etc. Each template is professionally designed with a standardized format and content framework.
[0115] After successfully acquiring a pre-set report template, the terminal device displays it clearly in full or split-screen format on a high-definition monitor. The monitor utilizes high-resolution display technology to ensure accurate rendering of every detail, including text, charts, and formatting. Users can zoom in, out, and flip through the template using touch, the mouse wheel, or keyboard shortcuts, allowing them to fully explore the template's contents.
[0116] If the user finds that the template needs to be personalized during the viewing process, he or she can trigger other operation instructions by long pressing or selecting on the display, or selecting the corresponding function in the special editing menu, and adjust the chapter structure, data display method, text expression and other contents of the template to make the template more suitable for the actual business needs of the user. At this time, the terminal device will automatically analyze the business requirement documents and related data materials of the user, use natural language processing technology to identify keywords that meet business needs, and mark these keywords as placeholders with eye-catching colors, special symbols (such as double brackets {{}}) or underlines. For example, key data items such as annual sales and profit growth rate in the template are marked in formats such as {{annual sales}}, {{profit growth rate}}, etc.
[0117] After completing personalized adjustment and keyword tagging, the terminal device will be connected to the stable network. Figure 2B The target report template shown is encrypted and compressed to ensure secure and efficient data transmission. The constructed report template is then uploaded to the server. Upon receiving the report template, the server immediately initiates the backend report generation process. Based on pre-set rules and algorithms, combined with relevant business data, the report content is automatically populated, completing the report generation process. This process is efficient, intelligent, and convenient.
[0118] Combine Figure 2C The schematic diagram shown is as follows: the specific implementation process of parsing the target report template is as follows.
[0119] S2011: Parse the structure of the target report template uploaded by the user, obtain the original element dataset in the first data format, and convert the original element dataset into the target element dataset in the second data format.
[0120] After the user uploads the target report template through the terminal device, the report generation system first performs format recognition on it, supporting various file formats such as the common Extensible Markup Language (XML), Portable Document Format (PDF), and Markdown. For different formats, corresponding parsing strategies are adopted:
[0121] (1) For XML format: Read the content of the XML document, parse the element tags such as paragraphs, headings, tables, and images, and obtain the element text content, style attributes (such as font, font size, color, etc.), and the hierarchical relationship between elements.
[0122] (2) For PDF format: Perform text extraction and element analysis on the PDF document, use Optical Character Recognition (OCR) technology to process scanned documents, divide the page into text blocks, image areas, and table areas, and identify the coordinate positions, font information, etc. of the text.
[0123] (3) For HTML format: Use the Jsoup parsing library to parse the HTML document into a Document Object Model (DOM) tree structure, traverse the nodes to obtain elements such as paragraphs, lists, and tables, extract the tag attributes and text content, and record the relative positions of the elements in the document.
[0124] To facilitate subsequent data processing and extraction, the system converts the original element dataset in the first data format into the second data format that is more suitable for analysis based on predefined mapping rules. This rule sets corresponding conversion logics for different element types:
[0125] (1) For text elements: Simplify the original style attributes into core style identifiers and establish a mapping table between the style attributes and the style identifiers. For example, convert "front-family: Songti; font-size: 14px; color; #000000" to "styleCode: T001".
[0126] (2) For table elements: Convert the table structure into a two-dimensional array form, and record the text content, merging situation, row and column where each cell is located, etc.
[0127] (3) For image elements: extract key information such as the image file name, size, and position in the document, and convert it into a second data format for storage.
[0128] S2012: traverse the converted target element data set, extract the element data matching the specified identifier and its location information in the target report template, until the traversal is completed, and obtain each data to be extracted and its location.
[0129] The system sequentially traverses each element in the target element dataset, matching each element's data against a specified identifier (such as the placeholder {{}}). It supports multiple matching methods, including exact matching, fuzzy matching, and regular expression matching. Once a match is successful, the system extracts the element's data content and records its location information within the target report template. This location information includes both the physical location (page number, page coordinates, row and column position), and the logical location representing the element's path within the document tree structure.
[0130] The system stores the extracted data and its location information in the result set. After the traversal is completed, the complete result set contains all element data matching the specified identifier and its detailed location, providing an accurate basis for subsequent report analysis and data extraction.
[0131] S202: In response to the data extraction configuration operation triggered by the usage object, respectively configure a data source for each piece of data to be extracted.
[0132] When the user enters through the terminal device Figure 2D After entering the data extraction configuration interface shown, the terminal device will automatically display the visual operation panel. During the interaction process, the user can configure each data item to be extracted in sequence: first, in the parameter selection area, through components such as drop-down menus, check boxes, or search boxes, accurately select the required parameters from the preset parameter configuration system; then, in the parameter attribute setting area, the user can customize the parameter name of the data to be extracted, supporting flexible naming in Chinese, English, or a combination of symbols. At the same time, in the parameter type drop-down list, select the adaptation type (such as string type, numeric type, date type, Boolean type, etc.) to clarify the data format specifications and processing logic.
[0133] The operation interface also provides a parameter description prompt function. When the mouse hovers over the parameter name, a floating window will pop up to display the parameter's definition, usage range, and precautions. For parameter type settings, the system will verify in real time whether the input content complies with the selected type rules. For example, the input box for numeric parameters only allows the input of numbers and specific symbols, and an error prompt will pop up immediately if the input is abnormal. The entire configuration process helps users efficiently complete the entire link operation from parameter selection to attribute definition through an intuitive interface layout and dynamic interactive feedback, laying the foundation for the accuracy and standardization of subsequent data extraction.
[0134] In response to the data extraction configuration operation triggered by the user, the system obtains the parameters selected by the user for each data to be extracted from the preset parameter configuration system. This system contains two types of parameters: one is public parameters (such as basic customer information, customer transaction information, customer name input, and financial data), which are available to all users but cannot be edited to ensure the uniformity and standardization of the basic configuration; the other is private parameters (questions sent to the big model), which are visible only to the user and support custom editing to meet personalized data extraction needs.
[0135] Before the system was put into operation, a mapping table between parameters and data sources was constructed based on business requirements and data characteristics. This mapping table records in detail the relationship between each parameter and the corresponding data source, and accurately labels the data source type, storage location, access protocol, and other information that are compatible with different parameters. Therefore, when the system receives the parameters selected by the user in the parameter configuration system, it can quickly and accurately configure the most appropriate data source for each data to be extracted based on the specific requirements and parameter characteristics of the data to be extracted based on this mapping table. Whether it is a structured database, unstructured file storage, or a real-time data stream interface, efficient matching can be achieved through this mapping table to ensure the smooth progress of data extraction.
[0136] S203: extracting target data contents of each to-be-extracted data from corresponding data sources respectively, and filling each target data content into corresponding positions of the target report template to generate a business report.
[0137] This application provides four types of data sources: HTTP, SQL, manual input, and large models. For different types of data sources, corresponding data extraction strategies are adopted:
[0138] (1) When the data source is the Hypertext Transfer Protocol (HTTP), a target data content associated with the data to be extracted is extracted from the network based on the generated data extraction request.
[0139] When the data source is HTTP, the object can be used through the terminal device Figure 2EIn the HTTP request configuration interface shown, enter key information such as the request address, request parameters, and request fields. After receiving this input, the system generates a data extraction request based on the request address, request parameters, and request fields, according to its internal processing logic and rules. Finally, the system sends the data extraction request to the network through the network communication module. The network routes and forwards the request based on the content of the request. Upon receiving the request, the target server processes it and returns a response containing the relevant data, thereby extracting the associated target data content from the network.
[0140] The request fields encompass the entire HTTP request, describing its attributes, behavior, and the data it carries. They fully define the characteristics and requirements of HTTP requests from multiple perspectives. Servers use these fields to accurately process requests. Request parameters and the request address are both part of the request fields. Request parameters, as the key data passed within the request fields, provide specific content for request processing, while the request address determines the location of the requested target resource.
[0141] In addition to request parameters and request address information, the request field also includes the request method (GET, POST, PUT, etc.), which is used to tell the server what operation to perform on the resource; request header fields, such as User-Agent for identifying client information, Content-Type for describing the data format of the request body, and Authorization for carrying authentication information, provide additional attributes and conditions for the request.
[0142] Request parameters are data variables that users pass when initiating an HTTP request, allowing the server to process the request according to specific requirements. For example, in an HTTP request to search for products, "keywords" are request parameters. By setting different keyword parameter values, users can instruct the server to return search results for corresponding products. For another example, when querying an order list, "order status," "start time," and "end time" can all be used as request parameters to limit the server to returning only order data that meets the criteria. Request parameters generally exist as key-value pairs, where the key is the parameter name and the value is the specific data content.
[0143] (2) When the data source is structured query language SQL, based on the generated data query request, a target data content associated with the data to be extracted is extracted from the database.
[0144] When the data source uses SQL, the system intelligently generates data query requests based on specific data requirements and data structure characteristics. Once generated, the system sends the query request to the target database via the corresponding database connection driver. It then extracts structured data from at least one of the relational and graph databases to obtain the target data content associated with the data to be extracted.
[0145] When a query request is sent to a relational database (such as MySQL or Oracle), the database engine parses, optimizes, and executes the SQL statement. Taking MySQL as an example, the query optimizer analyzes the statement and selects the optimal query execution plan, determining the order in which tables are joined and the indexes to use. During execution, the database reads the relevant data pages from disk or cache, performs operations such as filtering and joining based on the query criteria, and ultimately returns the qualifying data to the system in the form of a result set. After receiving the result set, the system formats the data and extracts the target data content associated with the data to be retrieved.
[0146] For graph databases, when a data query request is sent to the database, the graph database's query processor parses the statement and converts it into an execution plan. This execution plan efficiently traverses nodes and relationships based on the structural characteristics of the graph. For example, it uses an index to quickly locate the starting node and then traverses along the specified relationships. During the traversal process, the system selects nodes and relationships that meet the query criteria and organizes them into a result set for return. After obtaining the result set, the system further extracts and processes the graph structure data related to the data to be extracted, such as node attributes, relationship types, and other information.
[0147] If the requirement involves extracting data from both a relational database and a graph database, the system will generate separate query requests for both databases and send them sequentially or in parallel to the corresponding databases. After data extraction is complete, the system integrates the data obtained from the different databases. For example, it can link structured data obtained from the relational database with node relationship data from the graph database to supplement the relationship information between the data. This will yield complete target data content that is closely linked to the data to be extracted, providing comprehensive data support for subsequent applications such as report generation and data analysis.
[0148] (3) When the data source is manually input, the target data content of the data to be extracted is obtained by manually inputting the data using the object.
[0149] When the data source is manually entered, the system automatically displays a visual interactive interface to the user. This interface utilizes a responsive design, presenting the data entry area in a simple, clear form layout. Each data item to be extracted is clearly labeled, such as "Please enter the project completion date (format: YYYY-MM-DD)" or "Please fill in the customer's contact number." Icon prompts and format verification rules are also provided to guide users in standard input.
[0150] Users use the mouse to click or touch objects to fill in corresponding information in interactive components such as input boxes, drop-down menus, and date pickers. During the input process, the system performs real-time data format verification, for example, matching mobile phone number formats with regular expressions and limiting the date input range. If incorrect input is detected, an error message will be immediately displayed through pop-up windows, red borders, and other methods to ensure data accuracy.
[0151] Once the user completes the input and clicks "Submit," the system backend will immediately respond, extracting the manually entered target data and sending it to the server. Upon receiving the data, the server performs pre-processing operations such as security verification and data cleansing, ultimately accurately capturing the target data for each item to be extracted, providing a reliable data foundation for subsequent business processes such as report generation and data analysis.
[0152] (4) When the data source is a large model, the target data content associated with the data to be extracted is extracted by analyzing the question statement.
[0153] Manually compiling reports requires significant manpower and time. Report writers must expend considerable effort merging, calculating, and analyzing the massive amounts of collected data. This lengthy process not only increases labor costs but also severely impacts the overall progress and efficiency of report writing, making it impossible to meet the need for rapid response. Furthermore, the volume of data required for professional report writing is large and complex, encompassing a wide range of content, including specialized data, industry information, laws and regulations, and more. Report writers who rely solely on manual effort often face the dilemma of insufficient integration capabilities, making it difficult to comprehensively and accurately organize and utilize data. Furthermore, the quality of online data varies greatly, and during the data screening process, large amounts of junk data are often mixed in, further exacerbating the risk of inaccurate reported data.
[0154] To this end, this application builds a professional knowledge base covering structured data (such as tables, database records) and unstructured data (such as documents, reports, web page texts), and constructs a database system with intelligent indexing and storage architecture to achieve millisecond-level efficient full-text retrieval, support precise keyword search, flexible fuzzy matching, and intelligent retrieval based on semantic understanding, thereby reducing the unreliability of data sources, improving the relevance of problem and result data, and improving the efficiency of finding relevant professional knowledge. A private large model that has been trained with a large amount of industry data and optimized parameters is introduced to ensure that the input content strictly complies with industry standards. The large model receives user input, knowledge retrieval results, and customized professional prompts in real time. Based on the Transformer architecture and deep learning algorithms, it achieves accurate summarization of complex content, integration of multi-dimensional viewpoints, and logical context sorting, helping report writers to sort out and summarize complex information, making the output content more professional, unified, and standardized.
[0155] When the data source is a large model, the question statement is analyzed. When it is determined that the question statement requests the extraction of structured data, at least one operation of data query through the database and data analysis through the large model is performed to obtain target data content associated with the data to be extracted.
[0156] Specifically, the question statement is deeply analyzed through natural language processing technology. When it is determined that the question statement requests the extraction of structured data, the system automatically constructs SQL query statements or query instructions adapted to different database types based on the key information in the question statement, and performs efficient retrieval in the relational database and graph database in knowledge retrieval, quickly locates the records related to the data to be extracted, and obtains the first analysis result; the question statement is uploaded to the trained large model, and with the powerful learning and reasoning capabilities of the large model, the extracted data is deeply analyzed to obtain the second analysis result; finally, at least one of the first analysis result and the second analysis result is used as the target data content associated with the data to be extracted.
[0157] For example, using sales data as an example, a big model can use historical sales data and current market trends to predict sales trends for each region over a period of time, or identify areas experiencing unusual sales fluctuations and their potential causes. Furthermore, big models can also incorporate external data, such as market research reports, industry news, and other unstructured data, to supplement and provide reference for data analysis from a more macro perspective.
[0158] When the data source is a large model, the query is analyzed. If it is determined that the query is requesting the extraction of unstructured data, keyword analysis is performed on the query to retrieve a first dataset. The text features extracted from the question are then matched against pre-stored data features for similarity to obtain a second dataset. A comprehensive score is then performed on the first and second datasets based on the question, and a target dataset with a score ranking greater than a set threshold is selected. The target dataset is then input into the large model for data analysis, along with a preset prompt word, to obtain the target data content associated with the data to be extracted.
[0159] Specifically, the question statement is deeply analyzed through natural language processing technology. When it is determined that the question statement requests the extraction of structured data, the system performs a keyword search operation through Elasticsearch to obtain the first data set, and vectorizes the question statement through the Embedding model to obtain text features. The text features are then matched with the pre-stored data features through PostgreSQL to obtain the second data set.
[0160] The question, the first dataset, and the second dataset are then fed into the Rerank model for scoring, selecting the target dataset whose score matches the question. This data not only excels in text similarity but also accurately reflects the user's business needs in terms of semantic understanding and business logic. The target dataset is then combined with carefully designed preset prompts and fed into the large model for in-depth data analysis. The preset prompts guide the large model to perform specific tasks, ultimately outputting structured and organized target data content, which is presented to users in the form of text summaries, knowledge graphs, and other formats, effectively meeting the needs of extracting and analyzing unstructured data.
[0161] After obtaining the target data content for each data point to be extracted, the system populates the target data content into the corresponding position of the target report template. During the filling process, for text-based target data content, paragraph formatting, punctuation optimization, and terminology standardization are automatically performed. For numerical data, the system converts the data in the chart library into visual charts such as line charts and bar charts based on pre-set visualization rules.
[0162] After filling is completed, the system performs a dual mechanism of format verification and content review: the format verification module checks whether the font, font size, paragraph spacing, etc. conform to the template specifications; the content review module uses natural language processing technology to verify the logical coherence and data accuracy of the filled content. After passing the verification, the following is generated: Figure 2F The business report shown here uses standardized professional expressions and intuitive visual charts to comprehensively present in-depth analysis results extracted from structured and unstructured data, providing efficient and reliable information support for business decision-making, industry research and other scenarios.
[0163] After generating a business report, the system will also record the generation information of the business report and store the business report. The generation information includes but is not limited to: the specific time of report generation, the unique number of the generation task, the associated data source identifier (such as the large model version number, database index), the question statement entered by the user, the Rerank model scoring threshold, data screening strategy, visualization chart configuration parameters and other key settings, basic information of the user (such as user ID, operation terminal IP address), and the type of analysis task performed (such as industry trend analysis, policy impact assessment).
[0164] In response to the viewing operation triggered by the user, the system reads the generation information of the report file according to the recorded storage path, and then displays the recorded generation information of the business report to the user through the terminal device, helping the user to quickly understand the generation background, processing process and key parameters of the report, and realize transparent management of the entire process.
[0165] This application also provides users with comprehensive and convenient functions such as viewing report information, previewing, editing, and downloading. Users can trigger related functions through terminal devices to fully meet their diverse needs. Therefore, after generating a business report, at least one of the following operations is also included:
[0166] The system responds to the preview operation triggered by the usage object to view the report style and report content of the business report;
[0167] The system re-edits the report content of the business report in response to the editing operation triggered by the usage object;
[0168] The system downloads the business report to a designated storage location in response to a download operation triggered by the usage object.
[0169] For ease of understanding, combined Figure 3 The schematic diagram shown introduces the complete process of the report generation system automatically generating business reports and processing reports.
[0170] S301: Based on business needs, the user replaces the original parameters in the preset report template with placeholders that meet the business scenario, and uploads the target report template through the page interaction module.
[0171] S302: The system parses the uploaded template, filters the placeholders by specifying identifiers, and uniformly displays the user-defined keyword data to clarify data filling requirements.
[0172] S303: The user configures the parameter name and parameter type for each data to be extracted. The system responds to the data extraction configuration operation triggered by the user object, obtains the parameters selected by the user object for each data to be extracted in the preset parameter configuration system, and configures the most appropriate data source for each data to be extracted based on the mapping table between the parameters and the data source.
[0173] S304: The system extracts target data content of each to-be-extracted data from the corresponding data source, and fills each target data content into the corresponding position of the target report template to generate a business report.
[0174] S305: Record report generation information and store the business report in a designated location. The system responds to a viewing operation triggered by the user and supports the user to query the report record.
[0175] S306: In response to a preview operation triggered by the user, the system supports the user to preview the report style and content; in response to an edit operation triggered by the user, the system supports the user to modify and adjust the report content.
[0176] S307: In response to the download operation triggered by the user, the system downloads the generated report to a local designated storage location for use in business scenarios.
[0177] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a report generating device. Figure 4 As shown, the report generating device 400 may include:
[0178] The acquisition unit 401 is used to parse the target report template uploaded by the user object and obtain the data to be extracted and its location;
[0179] A configuration unit 402 is configured to configure a data source for each piece of data to be extracted in response to a data extraction configuration operation triggered by a usage object;
[0180] The generating unit 403 is configured to extract target data contents of the data to be extracted from corresponding data sources respectively, and fill the target data contents into corresponding positions of the target report template to generate a business report.
[0181] Optionally, the acquiring unit 401 is configured to:
[0182] Performing structural analysis on the target report template uploaded by the user object, obtaining an original element data set in a first data format, and converting the original element data set into a target element data set in a second data format;
[0183] The converted target element data set is traversed to extract element data matching the specified identifier and its location information in the target report template until the traversal is completed, thereby obtaining the data to be extracted and its location.
[0184] Optionally, the generating unit 403 performs the following operations on a piece of data to be extracted:
[0185] When the data source is Hypertext Transfer Protocol (HTTP), based on the generated data extraction request, extracting target data content associated with the data to be extracted from the network;
[0186] When the data source is structured query language SQL, based on the generated data query request, extracting target data content associated with the data to be extracted from the database;
[0187] When the data source is manually input, obtaining target data content of the one to-be-extracted data manually input by the user;
[0188] When the data source is a large model, the target data content associated with the data to be extracted is extracted by analyzing the question statement.
[0189] Optionally, the generating unit 403 is configured to:
[0190] When the data source is HTTP, a data extraction request is generated based on the request address, request parameters, and request fields;
[0191] The data extraction request is sent to extract target data content associated with the data to be extracted from the network.
[0192] Optionally, the generating unit 403 is configured to:
[0193] When the data source is structured query language SQL, a data query request is generated;
[0194] The data query request is sent, structural data is extracted from at least one of the relational database and the graph database, and target data content associated with the data to be extracted is obtained.
[0195] Optionally, the generating unit 403 is configured to:
[0196] When the data source is a large model, analyzing the question statement, and when it is determined that the question statement requests the extraction of structured data, performing at least one of a data query through a database and a data analysis through the large model to obtain target data content associated with the data to be extracted;
[0197] When the data source is a large model, the question statement is analyzed. When it is determined that the question statement requests the extraction of unstructured data, keyword analysis is performed on the question statement, a first data set is retrieved, and the text features extracted from the question statement are matched with the pre-stored data features for similarity to obtain a second data set; a comprehensive score is performed on the first data set and the second data set based on the question statement, and a target data set with a score ranking greater than a set threshold is selected; the target data set is input into the large model in combination with a preset prompt word for data analysis to obtain the target data content associated with the data to be extracted.
[0198] Optionally, the generating unit 403 is configured to:
[0199] Analyze the question statement by using a relational database and a graph database in knowledge retrieval to obtain a first analysis result;
[0200] Uploading the question sentence to the trained large model, and performing in-depth analysis by the large model to obtain a second analysis result;
[0201] At least one of the first analysis result and the second analysis result is used as target data content associated with the one piece of data to be extracted.
[0202] Optionally, after generating the business report, the report generating device 400 further includes an information viewing unit 404:
[0203] Recording the generation information of the business report and storing the business report;
[0204] In response to a viewing operation triggered by the usage object, the recorded generation information of the business report is displayed.
[0205] Optionally, after generating the business report, the report generating apparatus 400 further includes a processing unit 405, and the processing unit 405 performs at least one of the following operations:
[0206] In response to a preview operation triggered by the usage object, viewing a report style and report content of the business report;
[0207] Re-editing report content of the business report in response to an editing operation triggered by the usage object;
[0208] In response to a download operation triggered by the usage object, the business report is downloaded to a designated storage location.
[0209] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0210] After introducing the report generation method and apparatus according to an exemplary embodiment of the present application, a computer device according to another exemplary embodiment of the present application is introduced next.
[0211] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."
[0212] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computer device, see Figure 5 As shown, the computer device 500 may include at least a processor 501 and a memory 502. The memory 502 stores program codes, which, when executed by the processor 501, enable the processor 501 to perform any of the steps of the above-mentioned report generation method.
[0213] In some possible implementations, the computing device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the report generation method according to various exemplary embodiments of the present application described above in this specification. For example, the processor may execute the following steps: Figure 2A Follow the steps shown in .
[0214] Refer to the following Figure 6 hereinafter, a computing device 600 according to this embodiment of the present application is described. Figure 6 The computing device 600 is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0215] like Figure 6 As shown, computing device 600 is implemented as a general-purpose computing device. Components of computing device 600 may include, but are not limited to, at least one processing unit 601, at least one storage unit 602, and a bus 603 connecting various system components (including storage unit 602 and processing unit 601).
[0216] Bus 603 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a processor or local bus using any of a variety of bus architectures.
[0217] The storage unit 602 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 6021 and / or a cache memory unit 6022 , and may further include a read-only memory (ROM) 6023 .
[0218] The storage unit 602 may also include a program / utility 6025 having a set (at least one) of program modules 6024, such program modules 6024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0219] Computing device 600 can also communicate with one or more external devices 604 (e.g., a keyboard, pointing device, etc.), one or more devices that enable a user to interact with computing device 600, and / or any device that enables computing device 600 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via input / output (I / O) interface 605. Furthermore, computing device 600 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via network adapter 606. As shown, network adapter 606 communicates with other modules of computing device 600 via bus 603. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with computing device 600, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0220] Based on the same inventive concept as the above-mentioned method embodiment, various aspects of the business document transfer method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the report generation method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device can execute the following steps: Figure 2A Follow the steps shown in .
[0221] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable 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 thereof.
[0222] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0223] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A report generation method, characterized in that: include: Parse the target report template uploaded by the object to obtain the data to be extracted and its location; In response to the data extraction configuration operation triggered by the usage object, respectively configuring a data source for each of the data to be extracted; The target data contents of each data to be extracted are extracted from the corresponding data sources respectively, and each target data content is filled into the corresponding position of the target report template to generate a business report.
2. The method according to claim 1, wherein The parsing uses the target report template uploaded by the object to obtain the data to be extracted and its location, including: Performing structural analysis on the target report template uploaded by the user object, obtaining an original element data set in a first data format, and converting the original element data set into a target element data set in a second data format; The converted target element data set is traversed to extract element data matching the specified identifier and its location information in the target report template until the traversal is completed, thereby obtaining the data to be extracted and its location.
3. The method according to claim 1, wherein The target data content of each data to be extracted is extracted from the corresponding data source respectively, wherein the following operations are performed for each data to be extracted: When the data source is a Hypertext Transfer Protocol (HTTP), based on the generated data extraction request, extracting target data content associated with the data to be extracted from the network; When the data source is structured query language SQL, based on the generated data query request, extracting target data content associated with the data to be extracted from the database; When the data source is manually input, obtaining target data content of the one to-be-extracted data manually input by the user; When the data source is a large model, the target data content associated with the data to be extracted is extracted by analyzing the question statement.
4. The method according to claim 3, wherein When the data source is a Hypertext Transfer Protocol (HTTP), extracting target data content associated with the data to be extracted from the network based on the generated data extraction request includes: When the data source is HTTP, a data extraction request is generated based on the request address, request parameters, and request fields; The data extraction request is sent to extract target data content associated with the data to be extracted from the network.
5. The method according to claim 3, wherein When the data source is structured query language SQL, extracting target data content associated with the data to be extracted from the database based on the generated data query request includes: When the data source is structured query language SQL, a data query request is generated; The data query request is sent, structural data is extracted from at least one of the relational database and the graph database, and target data content associated with the data to be extracted is obtained.
6. The method according to claim 3, wherein When the data source is a large model, extracting target data content associated with the data to be extracted by analyzing the question statement includes: When the data source is a large model, analyzing the question statement, and when it is determined that the question statement requests the extraction of structured data, performing at least one of a data query through a database and a data analysis through the large model to obtain target data content associated with the data to be extracted; When the data source is a large model, the question statement is analyzed. When it is determined that the question statement requests the extraction of unstructured data, keyword analysis is performed on the question statement, a first data set is retrieved, and the text features extracted from the question statement are matched with the pre-stored data features for similarity to obtain a second data set; a comprehensive score is performed on the first data set and the second data set based on the question statement, and a target data set with a score ranking greater than a set threshold is selected; the target data set is input into the large model in combination with a preset prompt word for data analysis to obtain the target data content associated with the data to be extracted.
7. The method according to claim 6, wherein The performing at least one of a data query through a database and a data analysis through a large model to obtain target data content associated with the data to be extracted includes: Analyze the question statement by using a relational database and a graph database in knowledge retrieval to obtain a first analysis result; Uploading the question sentence to the trained large model, and performing in-depth analysis by the large model to obtain a second analysis result; At least one of the first analysis result and the second analysis result is used as target data content associated with the one piece of data to be extracted.
8. A report generating device, characterized in that: include: The acquisition unit parses the target report template uploaded by the object and obtains the data to be extracted and its location; A configuration unit, configured to configure a data source for each piece of data to be extracted in response to a data extraction configuration operation triggered by a usage object; The generating unit is configured to extract target data contents of the data to be extracted from corresponding data sources respectively, and fill the target data contents into corresponding positions of the target report template to generate a business report.
9. A computer device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor is enabled to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The method comprises a program code, and when the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Data analysis method and device in natural gas field, medium, equipment and product
CN120950557A
Data analysis method, device, medium, equipment and product in natural gas field
CN120950557B
Finance report generation method and system, terminal and storage medium
CN121413594A