A data report generation method and device, computer equipment and a storage medium

By pre-generating operation information in data reports and establishing a corresponding relationship with labels, and using numbers to identify operation information, the problem of cumbersome operations in existing technologies is solved, and efficient generation and flexible display of data reports are achieved.

CN111552704BActive Publication Date: 2026-02-03CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010181339.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-16
Publication Date
2026-02-03
Estimated Expiration
2040-03-16

AI Technical Summary

Technical Problem

The current data report generation process requires frequent editing of query statements and cannot flexibly link query results from different data tables, resulting in cumbersome and inflexible operations.

Method used

By pre-generating operation information and establishing a corresponding relationship with labels, operation information is uniquely identified using numbers. Labels are set in the report to simplify the setting of operation information. The labels are read to obtain data to populate the report. Modification and merging of data with the same structure are supported.

Benefits of technology

It greatly improves the speed of daily report creation, simplifies operation steps, and enhances the efficiency and flexibility of data report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111552704B_ABST
    Figure CN111552704B_ABST
Patent Text Reader

Abstract

The embodiment of the application belongs to the technical field of database structured calling, and relates to a data report generation method, which comprises the following steps: generating and storing corresponding operation information according to all data required by users, and establishing a label corresponding to the operation information, wherein the operation information comprises a statement for interacting with a database and a number for uniquely identifying the operation information; receiving, in a report, a label with the number in an orderly manner based on data required by a user, so as to arrange a display structure of data in the report; reading the label set in the report, and determining corresponding operation information through the number in the label; and filling the report with data according to the operation information, so as to complete the report. The application further provides a data report generation method device, a computer device and a storage medium. The code of the operation information is edited and set only once, and the operation information can be reused through multiple calls, so that the daily establishment speed of the report is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database structured retrieval technology, and in particular to a data report generation method, apparatus, computer equipment, and storage medium. Background Technology

[0002] Information publishing or display systems are typically implemented through a front-end interface and a back-end database. Logic code retrieves user requests from the front-end interface, triggers data retrieval from the back-end database, and then transmits the data to the front-end interface for display (e.g., a typical MVC architecture application). In existing information publishing or display systems, IT personnel regularly compile data into reports based on front-end requirements and send them to business users. However, existing data reports are inflexible because query statements cannot be directly defined within them; each time a report is generated, the relevant query statements must be edited. Furthermore, data reports retrieved through a single query statement typically directly reference the complete data table from the database for user display. For tables with the same structure, the query results cannot be correlated, resulting in incomplete display functionality. Therefore, generating data reports using the existing mechanism requires setting numerous query statements each time, followed by separate data display, making the process cumbersome. A more user-friendly method for displaying business data is needed. Summary of the Invention

[0003] The purpose of this application is to provide a data report generation method that can easily extract business data information to populate reports.

[0004] To address the aforementioned technical problems, this application provides a data report generation method, employing the following technical solution:

[0005] A data report generation method includes the following steps: generating and storing corresponding operation information based on the data requested by all users; establishing tags corresponding to the operation information, wherein the operation information includes statements for interacting with the database and a unique identifier for the operation information; receiving user requests based on the data requested by users and placing the tags with the numbers in an orderly manner to arrange the data display structure in the report; reading the tags set in the report and determining the corresponding operation information through the numbers in the tags; and obtaining data based on the operation information to populate the report and complete the report.

[0006] Furthermore, after the step of reading the labels set in the report and determining the corresponding operation information through the number in the label, and before obtaining data to populate the report based on the operation information to complete the report, the solution further includes: when a modification instruction is received, finding the corresponding operation information through the number in the label, and modifying the operation information to change the corresponding data operation; the step of obtaining data to populate the report based on the operation information to complete the report includes: obtaining data to populate the report based on the modified operation information to complete the report.

[0007] Furthermore, the step of reading the labels set in the report and determining the corresponding operation information through the numbers in the labels specifically includes: obtaining at least one set of labels in the report and extracting at least one set of numbers from the labels; arranging the at least one set of numbers into an ordered array; traversing the ordered array and obtaining the corresponding operation information based on each number in the ordered array.

[0008] Furthermore, the step of traversing the ordered array and obtaining the corresponding operation information based on the number of each item in the ordered array specifically includes: identifying the type of label, determining the data type of the operation information to be obtained based on the type of label; defining the display area in the report based on the data type of the operation information; finding the corresponding operation information by number; and the step of filling the report with the data obtained based on the operation information to complete the report includes: filling the data obtained based on the operation information into the display area defined in the report to complete the report.

[0009] Furthermore, the step of finding the corresponding operation information by number specifically includes: according to the type of label, retrieving the entry corresponding to the number in the data table corresponding to the type; extracting and returning the corresponding operation information from the entry.

[0010] Furthermore, the step of obtaining data to populate the report based on operation information to complete the report specifically includes: determining whether the data obtained from the operation information corresponding to multiple numbers in a label or multiple numbers in consecutive labels are data with the same structure, wherein the data with the same structure includes the same data type and the same arrangement; if the data obtained from the operation information corresponding to multiple numbers in a label or multiple numbers in consecutive labels are data with the same structure, then obtaining data with the same structure from multiple distributed databases according to the operation information; merging multiple sets of data of the same type into a data set; and replacing one or more consecutive corresponding labels with the merged data set.

[0011] Furthermore, the step of determining whether the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags is data with the same structure specifically includes: when multiple consecutive tags are of the same type, or multiple numbers are in the same tag, traversing the numbers in the multiple consecutive tags, or multiple numbers in the same tag, to obtain the operation information corresponding to the number; determining whether the data table fields, and / or parameters, and / or data types obtained corresponding to the operation information are the same; if the data table fields, and / or parameters, and / or data types obtained corresponding to the operation information are completely the same, then it is determined that the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags is data with the same structure.

[0012] To address the aforementioned technical problems, this application also discloses a data report generation device, comprising:

[0013] The generation module is used to generate and store corresponding operation information based on the data requested by all users, and to establish tags corresponding to the operation information. The operation information includes statements for interacting with the database and a unique identifier for the operation information.

[0014] The editing module is used to receive data requested by the user in the report and place labels with the numbers in an orderly manner to arrange the display structure of the data in the report.

[0015] The translation module is used to read the labels set in the report and determine the corresponding operation information through the numbers in the labels; and

[0016] The display module is used to obtain data based on operation information and populate the report to complete the report.

[0017] To address the aforementioned technical problems, this application also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the data report generation method described above.

[0018] To address the aforementioned technical problems, this application also discloses a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the data report generation method described above.

[0019] Compared with the prior art, the embodiments of this application have the following advantages: by pre-generating operation information and establishing a correspondence between the operation information and labels, and uniquely identifying them by number, the corresponding operation information is set in the report by setting labels. Then, the corresponding operation information is determined by reading the labels set in the report, and the data report is filled by executing the corresponding operation information. This solution simplifies the steps of setting operation information to setting labels. The operation information code is only edited and set once, and can be reused by multiple calls, which greatly improves the daily creation speed of reports. Attached Figure Description

[0020] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0022] Figure 2 This is a flowchart of an embodiment of a data report generation method according to this application;

[0023] Figure 3 This is a flowchart of another embodiment of a data report generation method according to this application;

[0024] Figure 4 yes Figure 2 or Figure 3 A flowchart of a specific implementation of step S300;

[0025] Figure 5 yes Figure 4 A flowchart of a specific implementation of step S303;

[0026] Figure 6 yes Figure 2 or Figure 3 A flowchart of a specific implementation of step S500;

[0027] Figure 7 yes Figure 6 A flowchart of a specific implementation of step S501;

[0028] Figure 8 This is a schematic diagram of one embodiment of a data report generation apparatus according to this application;

[0029] Figure 9 yes Figure 8A schematic diagram of the intermediate translation module 300;

[0030] Figure 10 yes Figure 8 The diagram shows the structure of module 500.

[0031] Figure 11 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0033] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0035] like Figure 1 As shown, the solution described in this invention can be applied to system architecture 100, allowing users to access server 105 through terminal devices 101, 102, and 103 to request corresponding data. System architecture 100 may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0036] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0037] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0038] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0039] It should be noted that the data report generation method provided in this application embodiment is generally developed by... Server / Terminal Terminal devices Execution, correspondingly, a data report generation device is generally set up in Server / Terminal Equipment middle.

[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0041] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of a data report generation method according to this application. The data report generation method includes the following steps:

[0042] Step S100: Based on the data requested by all users, generate and store the corresponding operation information, and establish a tag corresponding to the operation information, wherein the operation information includes the statement for interacting with the database and a number that uniquely identifies the operation information.

[0043] This solution uses labels in reports to interact with the database and retrieve data based on the data operation information within those labels, then displays the data uniformly through the reports. The data operation information defines the specific content of the database interaction, such as the SQL statement for querying specific information in a particular database. The reports collect this information and arrange it in an orderly manner for users to read and access. Based on users' typical data needs, corresponding data operation information is pre-generated. This information includes at least the authentication, query, and modification statements required for database interaction, most commonly SQL statements; the operation information also includes a unique identifier. This unique identifier can be a number. The data operation information can be pre-set according to user needs or generated in batches based on fields found in all data tables. After generation, the data operation information is stored separately. Specifically, it can be directly set in the report, with labels retrieving the information by number within the page; alternatively, it can be stored in a referenced document, which the report references, allowing labels to retrieve the information by number; or it can be stored as data in the corresponding table in the database, with labels querying and retrieving the information from the database based on the unique identifier.

[0044] Step S200: Receive the user's requested data in the report and place the labels with the numbers in an orderly manner to arrange the data display structure in the report.

[0045] Tags can be defined according to HTML, XML, and other formatting rules. Tags are identified by special characters, and the data type stored within the tag is defined by tags themselves. During the tag setting process, each tag can be assigned a number, with the system sequentially reading the tags, converting the numbers into operation information, and performing the corresponding operations. Alternatively, multiple numbers can be sequentially recorded within a single tag, corresponding to multiple sets of consecutive operation information.

[0046] By setting labels within the report area, and during report generation, executable code reads the report content and determines the data operation information by mapping the label numbers to data operation information, interacting with the database. The results of this interaction are then displayed at the corresponding label positions. Since reports, as presentation tools, require a specific data layout, the data display layout is determined by the label positions. During the executable code's reading of the report content, the data is displayed according to the label positions. Users can then set numbered labels within the report according to their desired layout and data content for subsequent retrieval.

[0047] Step S300: Read the labels set in the report and determine the corresponding operation information through the number in the label.

[0048] The executable code reads the labels set in the report, determines the area corresponding to the label in the report to be populated with data, identifies the number in the label, and determines the operation information through the one-to-one correspondence between the number and the operation information. The operation information usually includes executable code with SQL statements or HTML tags. These codes or tags are stored in the database as text fields, and the number can be used as the primary key of each operation information entry to uniquely identify an entry. The operation information is stored in the corresponding data table. A complete operation information is read by querying the number recorded in the label in the data table, which serves as the source basis for placing data at the position corresponding to the label.

[0049] Step S500: Obtain data based on the operation information to populate the report and complete the report.

[0050] The system retrieves relevant data from the database based on the obtained operational information and populates the report, replacing the labels set in the report. All labels in the report are traversed and replaced with the corresponding data to achieve automated report generation.

[0051] This solution pre-generates operation information and establishes a correspondence between it and labels, uniquely identifying each label with a number. Then, the corresponding operation information is set in the report by defining labels. The solution retrieves the operation information by reading the labels set in the report, executes the corresponding operation, and populates the data report. This solution simplifies the process of setting operation information to setting labels, using simple, defined parameters recorded in the labels for parameter passing. The operation information code is edited and set only once, and can be reused through multiple precise calls, greatly improving the speed of daily report creation.

[0052] In this embodiment, a data report generation method runs on an electronic device (e.g., Figure 1 shown Clothes Server / Terminal Equipment It can receive user requests and return corresponding data via wired or wireless connections. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods.

[0053] In some optional implementations of this embodiment, after step S300 and before step S500, the electronic device may further perform the following steps:

[0054] Step S400: Modify the operation information to change the corresponding data operation.

[0055] The operation information records the specific operations performed on the data. The system performs corresponding database operations based on the database operations defined in the operation information and returns the retrieved data to the report. Data operation information has multiple storage methods, and each tag is retrieved using a unique number. Modifications to the data operation information are made at the storage location. The operation information stores SQL statements for the database in HTML code or text format, enabling CRUD operations such as adding, deleting, modifying, and querying data. If the data operation corresponding to the tag's location is modified to change the displayed data, the modification of the SQL statement directly modifies most data operation methods, including authentication, the target database, and the data operation content. This directly modifies the data retrieved by the operation information without replacing the tag or its number. Furthermore, the tag and number can be directly accessed from multiple locations without repeated modifications, thus improving report generation efficiency.

[0056] Specifically, when a modification instruction is received, the corresponding operation information is found by referring to the number in the label, and the operation information is modified to change the corresponding data operation. Then, the data is obtained based on the modified operation information to populate the report and complete the report. The modification instruction typically modifies a specific piece of data, or several pieces of data from the same source. These data from the same source are labeled with the same information, so that the same data is written into the report when it is completed. An operation instruction is determined based on the number in the label, the operation instruction is modified, and then the label is read again to populate the table, thus updating the data.

[0057] In some optional implementations of this embodiment, step S300: reading the labels set in the report and determining the corresponding operation information through the numbers in the labels specifically includes:

[0058] Step S301: Obtain at least one set of labels from the report, and extract at least one set of numbers from the labels.

[0059] Each set of tags contains at least one set of numbers. By reading a set of tags, all numbers under that tag can be extracted.

[0060] Step S302: Arrange at least one set of numbers into an ordered array.

[0061] Arrange all the numbers in a label into an ordered array, and determine the operation information corresponding to the numbers in the array. The report may contain multiple labels. Extract the numbers from the multiple labels and arrange them into ordered arrays for the executable statements to traverse and execute sequentially.

[0062] Step S303: Traverse the ordered array and obtain the corresponding operation information based on the number of each item in the ordered array.

[0063] By traversing the ordered array and extracting the corresponding operation information, the order in which the numbers in the array are ordered determines the execution and display order of the operation information. In this way, the solution can obtain and execute operation information in an orderly manner.

[0064] See Figure 5 In some optional implementations of this embodiment, step S303: traversing the ordered array and obtaining the corresponding operation information based on the item number in the ordered array specifically includes:

[0065] Step S3031: Identify the type of label and determine the data type of operation information to be obtained based on the type of label.

[0066] Data typically includes data tables, calculated data values, and text or image information. Different types of image information correspond to different display areas. During operations, the operation information is stored in different locations according to the data type for easy classification and indexing by tags. Tags can be defined according to the definition rules of HTML, XML, etc. Tags are identified by special characters, and the data type stored in the tag is defined by the tags themselves.

[0067] Step S3032: Define the display area in the report based on the data type obtained from the operation information. The step of filling the report with data obtained from the operation information to complete the report includes filling the data obtained from the operation information into the defined display area of ​​the report to complete the report.

[0068] Different types of data may require different display areas. For example, table-type data has a predictable list width but a variable length display area; function result-type data can be assigned a fixed, smaller display area; and text-type data can have a display area shape defined according to the report design. Once the operation information is obtained, the data is populated into the designated display area during the actual data filling process to complete the report. Thus, based on the data type and actual display needs, data is filled into the corresponding areas to display the data in the required format.

[0069] Step S3033: Find the corresponding operation information by number.

[0070] Based on the data type, the system searches for the corresponding operation information in the relevant data table or file using a unique identifier (number). This identifier can be globally unique or based on a unique identifier within a category, and can be retrieved using a category tag. In one embodiment, to simplify the identifier, only a four-digit number is used, and the number corresponds to the type of operation information. For example, operation information number 0001 for a data table type is different from operation information number 0001 for statistical data types and image types. This approach allows for structured and rapid identification of operation information and determines the data display area based on the specific operation information.

[0071] In some optional implementations of this embodiment, step 500: obtaining data based on operation information to populate the report to complete the report specifically includes:

[0072] Step S501: Determine whether the data obtained corresponding to the operation information of a label or multiple numbers in a series of labels are data with the same structure.

[0073] Numbering can be used to separate multiple numbers within a single number, each corresponding to a different operation message. Alternatively, similar labels can be set consecutively, with each label containing a corresponding number. If the data types of the operation messages corresponding to these numbers are the same, multiple sets of data can be displayed together. In one embodiment, it is necessary to read data from tables with identical table structures and data types from a distributed database. Existing technologies typically process these tables separately. In this embodiment, these tables can be integrated into a single table for display. Alternatively, the data in the tables can be displayed in a related manner. First, it is necessary to determine whether the operation messages obtained through them have the same structure.

[0074] The data is identical, which is reflected in the identical data type and data arrangement. In one embodiment, for sales data statistics of different regions, the data includes region name and sales team name as strings, and sales quantity and sales product number as integers. When at least two consecutive numbers are obtained from sales data of different regions, the sales data of different regions can be merged and displayed in one place because the data type and data arrangement are the same.

[0075] The data similarity also manifests in the fact that the content is substantially the same. In one embodiment, two consecutive tags obtain data types that are both strings and integers, and the arrangement is consistent. However, one set of data reflects sales statistics, while the other set reflects personnel information statistics, and the data types obtained are strings representing personnel names and integers representing employee numbers, respectively. Although the data types of personnel information statistics and sales data statistics are the same, and the arrangement is also consistent, the content reflected by the data obtained by the two tags is inconsistent. Therefore, the two sets of data should not be merged for display. In specific operations, it can be determined whether the content reflected by the two sets of data is substantially the same based on the data source. For example, it can be judged based on the name or label of the data table being operated on. If the data tables used as data sources are sales record tables from different regions, it can be determined that the content of the two is substantially the same, and thus the data obtained by at least two sets of tags can be merged for display.

[0076] Step S502: If the data obtained corresponding to the operation information of multiple numbers in a tag or multiple consecutive tags are data with the same structure, then obtain the data with the same structure from multiple distributed databases according to the operation information.

[0077] When multiple consecutive operation messages correspond to the same data structure, the data is retrieved from the corresponding distributed database according to the operation message. In the application environment of the distributed database, the operation message contains the specific database accessed, and such operation message can still be uniquely identified by a number.

[0078] Step S503: Merge multiple sets of data of the same type into a single data set.

[0079] The same data obtained is aggregated into a data set, which is then placed in the report as a dataset.

[0080] Step S504: Replace one or more consecutive corresponding tags with the merged data set.

[0081] Replace all relevant labels with the dataset and arrange them in the report.

[0082] Step S505: If the data obtained corresponding to the operation information of a label or multiple numbers in a series of labels has different structures, then replace the corresponding labels with the data respectively. This process of label replacement and data filling is completed in the usual manner.

[0083] This solution can uniformly display structurally identical data stored in different locations. It also allows for statistical calculations and display of aggregated data. In one embodiment, business personnel need to obtain daily sales data. Since nationwide sales data is distributed across multiple databases, existing solutions require editing specific code for each database. However, the solution described in this application sets multiple tags, each corresponding to code for retrieving data from a specific database. It iterates through and reads the data corresponding to these tags, then displays it centrally. This solution facilitates the joint display of similar data from multiple databases.

[0084] In some optional implementations of this embodiment, step 501: determining whether the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags are data with the same structure specifically includes:

[0085] Step S5011: When multiple consecutive tags are of the same type, or multiple numbers are in the same tag, traverse the numbers in the multiple consecutive tags, or the multiple numbers in the same tag, and obtain the operation information corresponding to the number.

[0086] For consecutive data of the same type, the report can merge them to optimize the display structure, or perform calculations based on the data to obtain new exported data. These data are set consecutively in the report using labels. The corresponding numbers of these data can be obtained by placing a single label in the report, or by placing multiple consecutive labels in the report. By reading these consecutively set labels and obtaining the operation information corresponding to the numbers, it can be determined whether the above consecutive data is of the same type.

[0087] Step S5012: Determine whether the data table fields, or / and parameters, or / and data types obtained corresponding to the operation information are the same.

[0088] By reading the operation information, it is determined whether the data corresponding to the operation information is of the same type. This includes whether the obtained query results have the same fields, whether the values ​​under the fields have the same data type, and whether the parameters obtained through the SQL statement are consistent (including consistency in data type and consistency in content type).

[0089] Step S5013: If the data table fields, and / or parameters, and / or data types corresponding to the operation information are completely identical, then it is determined that the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags are data with the same structure.

[0090] If the determination result is that the field type and / or the values ​​under the field have the same data type, and / or the meaning of the parameters and values ​​is consistent, then the aforementioned consecutive data is determined to be data with the same structure. The data obtained corresponding to the operation information can be a query view of a data table, parameters, or data with a specific data type. Multiple numbers corresponding to the obtained data must involve completely identical view structures, parameters, and data types to be determined to be data with the same structure. For example, when querying a data table, if the query view includes several fields, and specific parameters are used to limit the results in the query view during the query process, it is necessary to determine that the table structure of the query view and the parameters affecting the results used in the query process are completely consistent before determining that the operation information corresponding to two numbers obtains data with the same structure. Alternatively, when using a function to query the database, if the data type of the function results is consistent, and both sets of function results are the results of querying corresponding fields in the same table structure, resulting in the two sets of function structures having the same meaning, then the operation information corresponding to two numbers is determined to obtain data with the same structure. This solution can determine the type of data called by the user while simultaneously determining that the data obtained by the operation information corresponding to two numbers has the same structure.

[0091] Step S5014: If the data table fields, or / and parameters, or / and data types obtained by the operation information are not completely the same, then it is determined that the obtained data structures are different, and the corresponding data is obtained to replace the corresponding labels.

[0092] For different operation information fields in the data table, after extracting the data, the corresponding labels are replaced according to the preset format to display the corresponding data items in separate columns. This makes it easy to distinguish the different data extracted from different operation information.

[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0094] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0095] Further reference Figure 4 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a data report generation device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0096] like Figure 4 As shown, the data report generation device 400 described in this embodiment includes: a generation module 100, an editing module 200, a translation module 300, and a display module 500. Wherein:

[0097] The generation module 100 is used to generate and store corresponding operation information according to the data requested by all users, and to establish a tag corresponding to the operation information. The operation information includes statements for interacting with the database and a number that uniquely identifies the operation information.

[0098] The editing module 200 is used to receive data requested by the user in the report and place labels with the numbers in an orderly manner to arrange the display structure of the data in the report.

[0099] The translation module 300 is used to read the labels set in the report and determine the corresponding operation information through the number in the label.

[0100] Adjustment module 400 is used to modify operation information to change the corresponding data operations.

[0101] The display module 500 is used to obtain data based on operation information and populate the report to complete the report.

[0102] In this embodiment, operation information is pre-generated and a correspondence is established between the operation information and labels, with each label uniquely identified by a number. Then, the corresponding operation information is set in the report by setting labels. The operation information is then determined by reading the labels set in the report, and data is obtained by executing the corresponding operation information, thus populating the data report. This solution simplifies the process of setting operation information to setting labels, using some defined simple parameters recorded in the labels for parameter passing. The operation information code is edited and set only once, and can then be reused through multiple precise calls, greatly improving the daily speed of report creation.

[0103] In some optional embodiments of this invention, the data report generation device further includes an adjustment module for modifying operation information to change the corresponding data operation.

[0104] In some optional embodiments of this example, the translation module 300 includes:

[0105] The tag acquisition submodule 301 is used to acquire at least one set of tags in the report and extract at least one set of numbers from the tags.

[0106] The permutation submodule 302 is used to arrange at least one set of numbers into an ordered array.

[0107] The operation information acquisition submodule 303 is used to traverse the ordered array and obtain the corresponding operation information based on the number of each item in the ordered array.

[0108] By traversing the ordered array and extracting the corresponding operation information, the order in which the numbers in the array are ordered determines the execution and display order of the operation information. In this way, the solution can obtain and execute operation information in an orderly manner.

[0109] In some optional embodiments of this example, the operation information acquisition submodule 303 is further configured to:

[0110] Identify the type of label and determine the data type of operation information to be obtained based on the label type;

[0111] Based on the data type obtained from the operation information, define the display area in the report;

[0112] The corresponding operation information is found by number; specifically, according to the type of label, the entry corresponding to the number is retrieved from the data table corresponding to the type; the corresponding operation information is extracted from the entry and returned.

[0113] This solution enables the rapid confirmation of operational information in a structured manner, and determines the area for data display based on the different operational information.

[0114] In some optional embodiments of this example, the display module 500 includes:

[0115] The structure judgment submodule 501 is used to determine whether the data obtained corresponding to the operation information of a label or multiple numbers in a series of labels are data with the same structure.

[0116] The data operation submodule 502 is used to obtain data with the same structure from multiple distributed databases according to the operation information; merge multiple sets of data of the same type into a data set; and replace one or more consecutive corresponding tags with the merged data set.

[0117] This approach iterates through and retrieves the data corresponding to these tags, then displays them centrally. This method is beneficial for displaying similar data from multiple databases together.

[0118] In some optional embodiments of this example, the structure determination submodule is further configured to: when multiple consecutive tags are of the same type, or multiple numbers are in the same tag, traverse the numbers in multiple consecutive tags, or multiple numbers in the same tag, to obtain the operation information corresponding to the number; determine whether the data table fields, or / and parameters, or / and data types corresponding to the operation information are the same; and determine that the data obtained corresponding to the operation information of a tag or multiple numbers in multiple consecutive tags are data with the same structure.

[0119] This scheme can determine the type of data requested by the user, and at the same time determine that the data obtained by the operation information corresponding to the two numbers has the same structure.

[0120] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.

[0121] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected via a system bus. It should be noted that only the computer device 6 with components 61-63 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0122] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0123] The memory 61 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit and its external storage device of the computer device 6. In this embodiment, the memory 61 is typically used to store the operating system and various application software installed on the computer device 6, such as the program code of a data report generation method. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or will be output.

[0124] In some embodiments, the processor 62 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run program code stored in the memory 61 or process data, for example, to run the program code for the data report generation method.

[0125] The network interface 63 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 6 and other electronic devices.

[0126] In the process of filling business reports, this device pre-generates operation information and establishes a correspondence between the operation information and labels, uniquely identifying each label with a number. Then, the corresponding operation information is set in the report by setting labels. The device then reads the labels set in the report to determine the corresponding operation information, executes the corresponding operation information to obtain data, and fills the data report. This solution simplifies the process of setting operation information to setting labels, using some defined simple parameters recorded in the labels for parameter passing. The operation information code is edited and set only once, and can be reused through multiple precise calls, greatly improving the speed of daily report creation.

[0127] This application also provides another embodiment, namely, a computer-readable storage medium storing a data report generation method program, which can be executed by at least one processor to perform the steps of the data report generation method described above.

[0128] The report population method stored in this storage medium pre-generates operation information and establishes a correspondence between this information and labels, uniquely identifying each label with a number. Then, the corresponding operation information is set in the report by setting labels. The method then reads the labels set in the report to determine the appropriate operation information, executes the corresponding operation to retrieve data, and populates the data report. This solution simplifies the process of setting operation information to setting labels, using simple, defined parameters recorded in the labels for parameter passing. The operation information code is edited and set only once, and can be reused through multiple precise calls, greatly improving the speed of daily report creation.

[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0130] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method for generating data reports, characterized in that, Includes the following steps: Based on the data requested by all users, corresponding operation information is generated and stored, and tags corresponding to the operation information are established. The operation information includes statements that interact with the database and a unique identifier for the operation information. The report receives data requested by the user and places labels with the numbers in an orderly manner to arrange the display structure of the data in the report; Read the labels set in the report and determine the corresponding operation information through the numbers in the labels; Data is obtained based on the operation information to populate the report and complete the report; The step of reading the labels set in the report and determining the corresponding operation information through the numbers in the labels specifically includes: Retrieve at least one set of labels from the report, and extract at least one set of numbers from the labels; Arrange at least one set of numbers into an ordered array; Traverse the sorted array and obtain the corresponding operation information based on the index of each item in the sorted array; The report contains multiple labels. The numbers from these labels are extracted and arranged into ordered arrays. The step of traversing the ordered array and obtaining the corresponding operation information based on the number of each item in the ordered array specifically includes: identifying the type of label, determining the data type of the operation information to be obtained based on the type of label; defining the display area in the report based on the data type of the operation information; and finding the corresponding operation information by number. The step of obtaining data based on operation information to populate the report and complete the report specifically includes: Determine whether the data obtained from the operation information corresponding to multiple numbers in a label or multiple consecutive numbers in multiple labels are data with the same structure, where the data structure is the same including the same data type and the same arrangement. If the data obtained from the operation information corresponding to multiple numbers in a label or multiple numbers in consecutive labels are data with the same structure, then the data with the same structure will be obtained from multiple distributed databases according to the operation information. Merge multiple sets of data of the same type into a single data set; Replace one or more consecutive corresponding tags by merging the data set; The similarity of the data is also reflected in the fact that the content is substantially the same. This is determined by the data source to determine whether the two sets of data reflect substantially the same content.

2. The data report generation method according to claim 1, characterized in that, After the steps of reading the labels set in the report and determining the corresponding operation information through the numbers in the labels, before filling the report with data based on the operation information to complete the report, the scheme further includes: When a modification instruction is received, the corresponding operation information is found by looking up the number in the corresponding label, and the operation information is modified to change the corresponding data operation. The steps of obtaining data based on operation information to populate the report and complete the report include: The report is populated with data obtained from the modified operation information to complete the report.

3. The data report generation method according to claim 1, characterized in that, The specific steps for traversing a sorted array and obtaining the corresponding operation information based on the item number in the sorted array include: Identify the type of label and determine the data type of operation information to be obtained based on the label type; Based on the data type obtained from the operation information, define the display area in the report; Find the corresponding operation information by number; The steps of obtaining data based on operation information to populate the report and complete the report include: Fill the data obtained from the operation information into the display area defined in the report to complete the report.

4. The data report generation method according to claim 3, characterized in that: The operation of finding the corresponding information by number specifically includes: Based on the type of label, retrieve the entry corresponding to the number in the data table corresponding to the type; Extract and return the corresponding operation information from the entry.

5. The data report generation method according to claim 1, characterized in that, The step of determining whether the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags have the same structure specifically includes: When multiple consecutive tags are of the same type, or multiple numbers are in the same tag, traverse the numbers in the multiple consecutive tags, or the multiple numbers in the same tag, and obtain the operation information corresponding to the number; Determine whether the data table fields, or / and parameters, or / and data types obtained corresponding to the operation information are the same; If the data table fields, and / or parameters, and / or data types corresponding to the operation information are exactly the same, then it is determined that the data obtained corresponding to the operation information of a tag or multiple numbers in a series of tags are data with the same structure.

6. A data report generation device, characterized in that, include: The generation module is used to generate and store corresponding operation information based on the data requested by all users, and to establish tags corresponding to the operation information. The operation information includes statements for interacting with the database and a unique identifier for the operation information. The editing module is used to receive data requested by the user in the report and place labels with the numbers in an orderly manner to arrange the display structure of the data in the report. The translation module is used to read the labels set in the report and determine the corresponding operation information through the number in the label; and The display module is used to obtain data based on operation information and populate the report to complete the report; The translation module includes: The tag acquisition submodule is used to acquire at least one set of tags from the report and extract at least one set of numbers from the tags; The permutation submodule is used to arrange at least one set of numbers into an ordered array; The operation information acquisition submodule is used to traverse the ordered array and obtain the corresponding operation information based on the number of each item in the ordered array. The report contains multiple labels. The numbers from these labels are extracted and arranged into ordered arrays. The operation information acquisition submodule is specifically used to identify the type of label, determine the data type of operation information to be acquired based on the type of label, define the display area in the report based on the data type of the operation information acquired, and find the corresponding operation information by number. The display module is specifically used to determine whether the data obtained from the operation information corresponding to multiple numbers in a tag or multiple numbers in consecutive tags are data with the same structure. The data with the same structure includes the same data type and the same arrangement. If the data obtained from the operation information corresponding to multiple numbers in a tag or multiple numbers in consecutive tags are data with the same structure, then the module obtains data with the same structure from multiple distributed databases according to the operation information; merges multiple sets of data with the same type into a single data set; and replaces one or more corresponding tags with the merged data set. The similarity of the data is also reflected in the fact that the content is substantially the same. This is determined by the data source to determine whether the two sets of data reflect substantially the same content.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a data report generation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of a data report generation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Report generation method and device

    CN105843788A

  • Data report processing method and device

    CN107491427A