CN111552704A - Data report generation method and device, computer equipment and storage medium - Google Patents

Data report generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111552704A
CN111552704A CN202010181339.1A CN202010181339A CN111552704A CN 111552704 A CN111552704 A CN 111552704A CN 202010181339 A CN202010181339 A CN 202010181339A CN 111552704 A CN111552704 A CN 111552704A
Authority
CN
China
Prior art keywords
data
operation information
report
label
numbers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010181339.1A
Other languages
Chinese (zh)
Inventor
王小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010181339.1A priority Critical patent/CN111552704A/en
Publication of CN111552704A publication Critical patent/CN111552704A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

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 steps of respectively generating and storing corresponding operation information according to data required by all users, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information; receiving the data required by the user based on the request, orderly placing the tags with the numbers in the report to arrange the display structure of the data in the report; reading a label set in a report, and determining corresponding operation information according to the number in the label; and acquiring data filling report forms according to the operation information to finish the report forms. The application also provides a data report generating method and device, computer equipment and a storage medium. According to the method and the device, the codes of the operation information are edited and set once, and the operation information can be reused by calling for many times, so that the daily establishment speed of the report is greatly increased.

Description

Data report generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the technical field of database structured calling, and in particular, to a method and an apparatus for generating a data report, a computer device, and a storage medium.
Background
In the existing information publishing or information displaying system, generally, according to the requirement of the front end, data is periodically summarized into a data report by an IT person and sent to a service person, however, the existing data report is inflexible because query statements cannot be directly defined in the data report, and the related query statements need to be directly edited to query each time a data report is issued. Meanwhile, the data report queried by a single query statement usually refers to the complete data table in the database directly and is displayed to the user; in the existing query mode, for data tables with the same structure, query results cannot be correlated, which results in an incomplete display function, so that generation of a data report through the existing mechanism needs to set a large number of query statements for query each time, and then obtained data is displayed respectively.
Disclosure of Invention
The embodiment of the application aims to provide a data report generating method which can conveniently extract business data information to fill a report.
In order to solve the above technical problem, an embodiment of the present application provides a data report generating method, which adopts the following technical solutions:
a data report generation method comprises the following steps: respectively generating and storing corresponding operation information according to data required by all users, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information; receiving the data required by the user based on the request, orderly placing the tags with the numbers in the report to arrange the display structure of the data in the report; reading a label set in a report, and determining corresponding operation information according to the number in the label; and acquiring data filling report forms according to the operation information to finish the report forms.
Further, after the step of reading the tag set in the report and determining the corresponding operation information according to the number in the tag, the scheme further includes, before the step of obtaining data according to the operation information and filling the report to complete the report: when a modification instruction is received, searching corresponding operation information through the number corresponding to the label, and modifying the operation information to change corresponding data operation; the step of obtaining the data filling report according to the operation information to complete the report comprises the following steps: and acquiring a data filling report according to the modified operation information so as to complete the report.
Further, the step of reading a tag set in the report and determining the corresponding operation information according to the number in the tag specifically includes: acquiring at least one group of tags in the report, and extracting at least one group of numbers in the tags; arranging at least one group of numbers into an ordered array; and traversing the ordered array, and acquiring corresponding operation information according to each serial number in the ordered array.
Further, the step of traversing the ordered array and obtaining the corresponding operation information according to each number in the ordered array specifically includes: identifying the type of the label, and determining the data type obtained by the operation information corresponding to the label according to the type of the label; according to the data type obtained by the operation information, a display area in the report is defined; searching corresponding operation information through the serial number; the step of obtaining the data filling report according to the operation information to complete the report comprises the following steps: and filling the data acquired by the operation information in a display area defined by the report to finish the report.
Further, the searching for the corresponding operation information through the number specifically includes: according to the type of the label, searching an entry corresponding to the number in a data table corresponding to the type; and extracting and returning corresponding operation information in the entry.
Further, the step of obtaining the data filling report according to the operation information to complete the report specifically includes: judging whether the data obtained by the operation information corresponding to the numbers in one label or the numbers in the continuous labels is the data with the same structure, wherein the data with the same structure comprises the same data type and the same arrangement mode; if the data obtained by the operation information corresponding to the numbers in one label or the numbers in the continuous labels are the data with the same structure, respectively obtaining the data with the same structure through a plurality of distributed databases according to the operation information; combining a plurality of groups of data with the same type into a group of data aggregate; replacing one or a plurality of corresponding labels in succession by the combined data collection.
Further, the step of determining whether the data obtained by corresponding to the operation information corresponding to the plurality of numbers in the one label or the plurality of consecutive labels is the data with the same structure specifically includes: when the types of the continuous labels are the same or a plurality of numbers are in the same label, traversing the numbers in the continuous labels or the numbers in the same label to obtain the operation information corresponding to the numbers; judging whether the fields, or/and parameters, or/and data types of the data table obtained corresponding to the operation information are the same; and if the fields, or/and the parameters, or/and the data types of the data tables obtained corresponding to the operation information are completely the same, determining that the data obtained corresponding to the operation information corresponding to a plurality of numbers in one label or a plurality of continuous labels are the data with the same structure.
In order to solve the above technical problem, the present application further discloses a data report generating device, including:
the generating module is used for respectively generating and storing corresponding operation information according to data required by all users, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information;
the editing module is used for receiving the data required by the user based on the request in the report form, orderly placing the labels with the numbers, and arranging the display structure of the data in the report form;
the translation module is used for reading a label set in the report and determining corresponding operation information according to the number in the label; and
and the display module is used for acquiring the data filling report according to the operation information so as to finish the report.
In order to solve the above technical problem, the present application further discloses a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the above data report generating method when executing the computer program.
In order to solve the above technical problem, the present application further discloses a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the above data report generating method.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: the method comprises the steps of generating operation information in advance, establishing a corresponding relation between the operation information and a tag, uniquely determining through a serial number, setting corresponding operation information in a report through the setting of the tag, determining the corresponding operation information through reading the tag set in the report, and realizing filling of the data report through executing the corresponding operation information.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a datagram table generation method according to the present application;
FIG. 3 is a flow chart of another embodiment of a datagram generation method according to the present application;
FIG. 4 is a flowchart of one embodiment of step S300 of FIG. 2 or FIG. 3;
FIG. 5 is a flowchart of one embodiment of step S303 of FIG. 4;
FIG. 6 is a flowchart of one embodiment of step S500 in FIG. 2 or FIG. 3;
FIG. 7 is a flowchart of one embodiment of step S501 in FIG. 6;
FIG. 8 is a block diagram illustrating one embodiment of a datagram generation apparatus according to the present application;
FIG. 9 is a block diagram of the translation module 300 of FIG. 8;
FIG. 10 is a schematic diagram of the structure of the display module 500 of FIG. 8;
FIG. 11 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, 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 belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the solution described in the present invention can be applied to a system architecture 100, and a user can access a server 105 through terminal devices 101, 102, and 103 to request corresponding data. The system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, a method for generating a data report provided by the embodiments of the present application generally includesServer/terminal Terminal equipmentExecution, accordingly, a datagram generating device is generally providedServer/terminal deviceIn (1).
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a datagram generation method in accordance with the present application is shown. The data report generation method comprises the following steps:
step S100: according to data required by all users, generating and storing corresponding operation information respectively, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information.
According to the scheme, the labels are arranged in the report, data are interactively acquired from the database according to the data operation information in the labels, and the data are uniformly displayed through the report. The data operation information defines specific content interacting with the database, such as SQL statements for querying specific information in a specific database. The report forms are orderly arranged by collecting the information so as to be read and called by a user. Generating corresponding data operation information in advance according to the conventional data requirements of a user, wherein the data operation information at least comprises operation statements such as identity authentication, query, modification and the like required by interaction with a database, and the most common data operation information comprises SQL statements; the operation information also comprises a number which is used as an identifier of the data operation information and uniquely determines one piece of data operation information. The generation mode of the data operation information can be preset according to the requirements of users, or can be generated in batch according to fields in all data tables. The data operation information is generated and then is independently stored, the data operation information can be directly set in a report form, the tag obtains the data operation information according to the number through a form called in a page, or the data operation information can be stored in a document to be transferred, the report form refers to the document, and the tag obtains the data operation information according to the number through the reference of the report form; the data operation information can also be stored in a corresponding data table in a database in a data form, and the tag queries and acquires the database according to a number which uniquely identifies the operation information.
Step S200: and receiving the tags with the numbers which are orderly placed by the user based on the data required to be requested so as to arrange the display structure of the data in the report.
The tag can be defined according to definition rules in HTML, XML and other formats, the tag is identified by special characters, and the data type of data stored in the tag is defined by the mark in the tag. In the process of setting the label. The label setting may be that a number is recorded in each label, the system reads the label in sequence, and converts the number in the label into operation information and performs related operations, or that a plurality of numbers are recorded in sequence in a label, and the label corresponds to a plurality of groups of continuous operation information.
The method comprises the steps that a label is arranged in a report area, in the process of generating a report, an executable code reads content in the report, data operation information is determined and interacted with a database through the corresponding relation between a serial number in the label and the data operation information, then the interaction result is displayed on the position corresponding to the label, the report is used as a display tool and has layout requirements on display of data, the data are displayed through the display layout of the position where the label is arranged, and in the process of reading the report content through the executable code, the data are displayed according to the position layout where the label is arranged. The operator sets the label with the number in the report according to the required report layout data content for subsequent reading.
Step S300: reading the label set in the report, and determining the corresponding operation information according to the number in the label.
The executable code reads the label set in the report, determines the corresponding area of the label in the report to be filled with data, identifies the number in the label, and determines the operation information through the one-to-one correspondence relationship between the number and the operation information, usually, the operation information includes the executable code with SQL statement or HTML mark, these codes or marks are stored in the database in the form of text field, and the number can be used as the main key of each operation information entry to uniquely identify an entry, the operation information is stored in the corresponding data table, and a complete piece of operation information is read by inquiring the number recorded in the label in the data table, and is used as the source basis of the position placing data corresponding to the label.
Step S500: and acquiring data filling report forms according to the operation information to finish the report forms.
Related data are inquired in a corresponding database through the acquired operation information and filled in the report, the set labels in the report are replaced, all the labels in the report are traversed, and the labels are replaced into corresponding data, so that automatic generation of the report is realized.
The scheme is characterized in that operation information is generated in advance, the corresponding relation between the operation information and the tags is established, unique determination is carried out through the serial numbers, corresponding operation information is set in a report through setting the tags, corresponding operation information is determined through reading the tags set in the report, data is obtained through executing the corresponding operation information, and filling of the data report is achieved. The codes of the operation information are edited and set only once, and then the operation information can be reused through multiple times of accurate calling, so that the daily establishment speed of the report is greatly increased.
In this embodiment, an electronic device (for example, the electronic device shown in fig. 1) on which a data report generation method operatesGarment Server/terminal device) The request of the user and the corresponding data can be received through a wired connection mode or a wireless connection mode. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In some optional implementations of this embodiment, after step S300 and before step S500, the electronic device may further perform the following steps:
step S400: the operation information is modified to alter the corresponding data operation.
The specific operation mode of the data is recorded in the operation information, the system performs corresponding operation on the database through database operation defined in the operation information and returns the acquired data to the report, the data operation information has various storage modes, the tags acquire the data through uniquely determined numbers, and the data operation information is modified at the position where the data operation information is stored. SQL sentences for the database are stored in the operation information in the form of HTML codes or texts, and operations such as adding, deleting, modifying, checking and the like are realized for the database through the SQL sentences. If the data operation corresponding to the position of the label is modified to change the displayed data, most data operation modes including identity verification, a target database and data operation contents can be directly modified for the SQL statement modification, so that the data which can be obtained by the operation information can be directly modified without replacing the label and the number in the label, and on the basis, the label and the number can be directly called at a plurality of positions without repeated modification, thereby improving the generation efficiency of the report.
Specifically, when a modification instruction is received, corresponding operation information is searched for by corresponding to the number in the tag, and the operation information is modified to change corresponding data operation; and then acquiring a data filling report according to the modified operation information so as to complete the report. The modification instruction is usually to modify data in a certain place or data in the same source of several data, and these data in the same source are written into the same data by placing the same tag when the report is completed. And determining an operation instruction according to the number in the tag, modifying the operation instruction, reading the tag, filling the table, and updating the data.
In some optional implementations of this embodiment, step S300: reading a tag set in a report, and determining corresponding operation information according to the number in the tag specifically comprises the following steps:
step S301: at least one group of labels in the report is obtained, and at least one group of numbers in the labels is extracted.
At least one group of serial numbers is stored in each group of tags, and all serial numbers under the tags are extracted by reading one group of tags.
Step S302: at least one set of numbers is arranged in an ordered array.
And all the numbers in one label are orderly arranged in an orderly array, and the operation information corresponding to the numbers in the array is determined. The report may include a plurality of tags, and numbers in the tags are extracted and respectively arranged into ordered arrays for the executable statements to respectively traverse and sequentially execute.
Step S303: and traversing the ordered array, and acquiring corresponding operation information according to each serial number in the ordered array.
And respectively extracting corresponding operation information and the sequence of numbers in the array by traversing the ordered array, and determining the execution and display sequence of the operation information. In this way, the scheme can orderly acquire operation information and execute the operation information.
Referring to fig. 5, in some alternative implementations of the present embodiment, step S303: traversing the ordered array, and acquiring corresponding operation information according to each serial number in the ordered array specifically comprises the following steps:
step S3031: and identifying the type of the label, and determining the data type obtained by the operation information corresponding to the label according to the type of the label.
The data generally includes a data table, data operation values, and text or image information, different image information corresponds to different types of display areas, and during the operation process, the operation information is stored in different positions according to different data types, so as to be classified and indexed by a label. The tag can be defined according to definition rules in HTML, XML and other formats, the tag is identified by special characters, and the data type of data stored in the tag is defined by the mark in the tag.
Step S3032: and according to the data type obtained by the operation information, defining a display area in the report. And the step of acquiring the data filling report according to the operation information to complete the report comprises the step of filling the data acquired by the operation information in a display area defined by the report to complete the report.
The display areas corresponding to different types of data displays may also be different, for example, a display area with an expected list width but an indefinite length is provided for data in a data table class; the data type of the function result class can be given a fixed display area with smaller size; the text-like data may define a shape of the display area based on the design of the report. After the operation information is acquired, in the specific filling process, the data acquired according to the operation information is filled in the defined display area to complete the report, so that the data is filled in the corresponding area according to the type of the data and the actual display requirement to display the corresponding data in a required form.
Step S3033: and searching corresponding operation information through the number.
And searching in a corresponding data table or file according to the data type through the serial number to acquire corresponding operation information. The number may be given as a globally unique number for the operation information, or may be called by a tag of a category based on a unique number in a category according to the category of the operation information. In one embodiment, to simplify the numbering, only four digits of numbers are reserved, and the numbers correspond to the types of the operation information, and the operation information No. 0001 of the data table type is different from the operation information No. 0001 of the statistical data type and the operation information No. 0001 of the picture type. The scheme can be used for quickly confirming the operation information in a structured mode and confirming the data display area according to different operation information.
In some optional implementations of this embodiment, step 500: the step of obtaining the data filling report according to the operation information to complete the report specifically comprises the following steps:
step S501: and judging whether the data obtained by corresponding to the operation information corresponding to the plurality of serial numbers in one label or a plurality of continuous labels is the data with the same structure.
The number can be used by separately placing a plurality of numbers in one number through separators to correspond to a plurality of operation information, or by continuously setting the same type of labels, each label is placed with the corresponding number, and if the data types obtained by the operation information corresponding to the numbers are the same, a plurality of groups of data can be jointly displayed. In one embodiment, data in data tables with identical table structures need to be read from distributed databases, and the types of data read are also identical, and these tables are usually processed separately in the prior art, and in this embodiment, these tables may be integrated into one table display. Or displaying the data in the table in a correlated way. First, it is necessary to judge the operation information to determine that the data acquired by the operation information is data with the same structure.
Where the data is the same, it turns out that the type of data acquired and the arrangement of the data are the same in form. In one embodiment, the sales data statistics of different large areas includes the area name and the sales team name of which the data types are character strings, and the sales quantity and the sales product number of which the data types are shaping, so that when the data obtained by at least two consecutive numbers are the sales data of different large areas respectively, the sales data of different large areas can be merged and displayed at one place because the data types and the data arrangement modes are the same.
The data is also substantially identical in content, in one embodiment the data types obtained for two consecutive tags are both string and reshaped and are arranged in a consistent manner, but one set of data reflects sales data statistics, another set of data reflects staff information statistics, and the data types of the obtained data are string representing staff names and reshaped representing staff numbers, respectively. Although the data types of the personnel information statistics and the data types of the sales data statistics are consistent and the arrangement is also consistent, the contents of the substantial responses of the data acquired by the two tags are inconsistent, that is, the two groups of data should not be combined and displayed, in the specific operation process, whether the contents of the two groups of data responses are substantially the same can be determined according to the data source, for example, the judgment is performed according to the name or the mark of the data table of the data operation, if the data tables serving as the data source are the sales record tables of different large areas, the contents of the two groups of data can be determined to be substantially the same, and the data acquired by at least two groups of tags are combined and displayed.
Step S502: and if the data corresponding to the operation information corresponding to the plurality of serial numbers in one label or a plurality of continuous labels is the data with the same structure, respectively acquiring the data with the same structure through a plurality of distributed databases according to the operation information.
When the data structures correspondingly obtained by a plurality of continuous operation information are the same, the data are respectively obtained through the corresponding distributed databases according to the operation information, and in the application environment of the distributed databases, the operation information comprises the specific accessed database, and the operation information can still be uniquely identified through the serial number.
Step S503: and combining a plurality of groups of data with the same type into a group of data aggregate.
And summarizing the acquired same data into a data total set, and placing the data total set in a report as a data set.
Step S504: replacing one or a plurality of corresponding labels in succession by the combined data collection.
And replacing all related labels by data sets and arranging the data sets in the report.
Step S505: and if the operation information corresponding to a plurality of numbers in one label or a plurality of continuous labels corresponds to the acquired data with different structures, replacing the corresponding label with the data respectively. The replacement of the tag and the filling of the data is thus done in a conventional manner.
According to the scheme, data with the same structure stored in different positions can be displayed in a unified mode, meanwhile, corresponding statistical operation and display can be conducted on the summarized data, in a group of embodiments, business personnel need to obtain sales data on the same day, the sales data in the national range are stored in a distributed mode in a plurality of data, corresponding codes need to be edited for each database respectively to obtain the existing scheme, the scheme recorded in the application is that a plurality of labels are arranged, each label corresponds to the code obtained by the data in the corresponding database, data corresponding to the labels are obtained through traversing and reading, and the data are displayed in a centralized mode. The scheme is beneficial to displaying the same kind of data in a plurality of databases together.
In some optional implementations of this embodiment, step 501: judging whether the data obtained by corresponding to the operation information corresponding to the plurality of serial numbers in one label or a plurality of continuous labels is data with the same structure specifically comprises the following steps:
step S5011: and when the types of the continuous labels are the same or a plurality of numbers are in the same label, traversing the numbers in the continuous labels or the numbers in the same label to acquire the operation information corresponding to the numbers.
For continuous data of the same type, the report can combine the data to optimize a display structure, or calculate according to the data to obtain new derived data, the data are continuously set in the report through tags, the obtained numbers corresponding to the data can be placed in the report through one tag, or can be placed in the report through a plurality of continuous tags, and whether the continuous data are the data of the same type is judged by reading the continuously set tags and obtaining the operation information corresponding to the numbers.
Step S5012: and judging whether the fields, or/and the parameters, or/and the data types of the data tables obtained corresponding to the operation information are the same.
Whether the data corresponding to the operation information is of the same type is obtained by reading the operation information, wherein the data includes whether the obtained query result has the same field, whether the values under the field have the same data type, and whether the parameters obtained by the SQL statement are consistent (including consistency on the data type and consistency on the content type).
Step S5013: and if the fields, or/and the parameters, or/and the data types of the data tables obtained corresponding to the operation information are completely the same, determining that the data obtained corresponding to the operation information corresponding to a plurality of numbers in one label or a plurality of continuous labels are the data with the same structure.
And if the judgment result is the type of the field, and/or the values under the field have the same data type, and/or the meanings of the parameters and the values are consistent, determining that the continuous data are the data with the same structure. The data acquired corresponding to the operation information may be a query view of a data table, a parameter, or data with a certain data type. The view structure, parameters and data types related to the acquired data corresponding to the plurality of numbers are completely the same, and the data can be determined to be the data with the same structure. For example, a data table is queried, a query view includes a plurality of fields, and in the query process, a result in the query view is limited by using a specific parameter, and it is necessary to determine operation information corresponding to two numbers only when the table structure of the query view is completely consistent with the parameter used in the query process and affecting the result, and the obtained data is data with the same structure. Or when the database is queried to obtain the function result by using the function, the data types of the function result are consistent, and the two groups of function results are the results of querying the corresponding fields in the same table structure, so that the meanings of the two groups of function structures are the same, at this time, the operation information corresponding to the two numbers is determined, and the obtained data are the data with the same structure. The scheme can determine the data type called by the user and simultaneously determine that the data acquired by the operation information corresponding to the two numbers have the same structure.
Step S5014, if the fields, or/and the parameters, or/and the data types of the data tables obtained corresponding to the operation information are not completely the same, determining that the obtained data structures are different, and respectively obtaining corresponding data to replace corresponding tags.
For the acquired different operation information of the data table fields, after the data are extracted, corresponding labels are replaced according to a preset format respectively, and corresponding data items are displayed in columns, so that the different data extracted by the different operation information can be obviously distinguished.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 4, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a data report generating apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 4, a datagram table generating apparatus 400 according to this embodiment includes: the system comprises a generation module 100, an editing module 200, a translation module 300 and a display module 500. Wherein:
the generating module 100 is configured to generate and store corresponding operation information according to data required by all users, and establish a tag corresponding to the operation information, where the operation information includes a statement interacting with a database and a number uniquely identifying the operation information.
And the editing module 200 is used for receiving the data required by the user in the report and orderly placing the tags with the numbers to arrange the display structure of the data in the report.
The translation module 300 is configured to read a tag set in the report, and determine corresponding operation information according to the number in the tag.
And an adjusting module 400 for modifying the operation information to change the corresponding data operation.
And the display module 500 is used for acquiring data filling reports according to the operation information so as to complete the reports.
In this embodiment, the operation information is generated in advance, the correspondence between the operation information and the tag is established, the unique identification is performed through the serial number, the corresponding operation information is set in the report through the setting tag, the corresponding operation information is determined through reading the tag set in the report, the data is obtained through executing the corresponding operation information, and the data report is filled. The codes of the operation information are edited and set only once, and then the operation information can be reused through multiple times of accurate calling, so that the daily establishment speed of the report is greatly increased.
In some optional manners of this embodiment, the apparatus for generating a datagram table further includes: and the adjusting module is used for modifying the operation information to change the corresponding data operation.
In some alternatives of the embodiment, the translation module 300 includes:
the tag obtaining sub-module 301 is configured to obtain at least one set of tags in the report, and extract at least one set of numbers in the tags.
A permutation submodule 302 for permuting at least one of the sets of numbers into an ordered array.
The operation information obtaining submodule 303 is configured to traverse the ordered array, and obtain corresponding operation information according to each serial number in the ordered array.
And respectively extracting corresponding operation information and the sequence of numbers in the array by traversing the ordered array, and determining the execution and display sequence of the operation information. In this way, the scheme can orderly acquire operation information and execute the operation information.
In some optional manners of this embodiment, the operation information obtaining sub-module 303 is further configured to:
identifying the type of the label, and determining the data type obtained by the operation information corresponding to the label according to the type of the label;
according to the data type obtained by the operation information, a display area in the report is defined;
searching corresponding operation information through the serial number; specifically, according to the type of the label, searching the entry corresponding to the number in the data table corresponding to the type; and extracting and returning corresponding operation information in the entry.
The scheme can be used for quickly confirming the operation information in a structured mode and confirming the data display area according to different operation information.
In some alternatives of this embodiment, the display module 500 includes:
the structure determining submodule 501 is configured to determine whether the data obtained by corresponding to the operation information corresponding to the plurality of numbers in one tag or a plurality of consecutive tags is data with the same structure.
The data operation submodule 502 is configured to obtain data with the same structure through a plurality of distributed databases according to the operation information; combining a plurality of groups of data with the same type into a group of data aggregate; and also for replacing one or a consecutive plurality of corresponding tags by the merged data collection.
The scheme is used for traversing and reading the data corresponding to the tags, and displaying the data in a centralized manner. The scheme is beneficial to displaying the same kind of data in a plurality of databases together.
In some optional manners of this embodiment, the structure determining sub-module is further configured to, when the types of the consecutive tags are the same or multiple numbers are in the same tag, traverse the numbers in the consecutive tags or multiple numbers in the same tag, and obtain operation information corresponding to the numbers; judging whether the fields, or/and parameters, or/and data types of the data table obtained corresponding to the operation information are the same; the method is also used for determining that the data obtained by corresponding to the operation information corresponding to the plurality of numbers in one label or a plurality of continuous labels are the data with the same structure.
The scheme can determine the data type called by the user and simultaneously determine that the data acquired by the operation information corresponding to the two numbers have the same structure.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 6, fig. 6 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only a computer device 6 having components 61-63 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a 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, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal storage unit of the computer device 6 and an external storage device thereof. In this embodiment, the memory 61 is generally used for storing an operating system installed in the computer device 6 and various types of application software, such as a program code of a data report generating method. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute the program code stored in the memory 61 or process data, for example, execute the program code of the datagram generation method.
The network interface 63 may comprise a wireless network interface or a wired network interface, and the network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The device is characterized in that operation information is generated in advance in the process of filling the business report, the corresponding relation between the operation information and the label is established, the operation information is uniquely determined through the number, corresponding operation information is set in the report through the setting label, corresponding operation information is determined through reading the label set in the report, data is obtained through executing the corresponding operation information, and filling of the data report is realized. The codes of the operation information are edited and set only once, and then the operation information can be reused through multiple times of accurate calling, so that the daily establishment speed of the report is greatly increased.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing a datagram generating method program, which is executable by at least one processor to cause the at least one processor to perform the steps of a datagram generating method as described above.
The method for filling the report form stored in the storage medium is characterized in that operation information is generated in advance in the process of filling the business report form, the corresponding relation between the operation information and the label is established, the operation information is uniquely determined through numbering, corresponding operation information is set in the report form through setting the label, the corresponding operation information is determined through reading the label set in the report form, data is obtained through executing the corresponding operation information, and filling of the data report form is realized. The codes of the operation information are edited and set only once, and then the operation information can be reused through multiple times of accurate calling, so that the daily establishment speed of the report is greatly increased.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A data report generation method is characterized by comprising the following steps:
respectively generating and storing corresponding operation information according to data required by all users, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information;
receiving the data required by the user based on the request, orderly placing the tags with the numbers in the report to arrange the display structure of the data in the report;
reading a label set in a report, and determining corresponding operation information according to the number in the label;
and acquiring data filling report forms according to the operation information to finish the report forms.
2. The method according to claim 1, wherein after the step of reading the tag set in the report and determining the corresponding operation information according to the number in the tag, the scheme further includes, before the step of obtaining data to fill the report according to the operation information to complete the report:
when a modification instruction is received, searching corresponding operation information through the number corresponding to the label, and modifying the operation information to change corresponding data operation;
the step of obtaining the data filling report according to the operation information to complete the report comprises the following steps:
and acquiring a data filling report according to the modified operation information so as to complete the report.
3. The method for generating a data report according to claim 1, wherein the step of reading a tag set in the report and determining corresponding operation information according to the number in the tag specifically comprises:
acquiring at least one group of tags in the report, and extracting at least one group of numbers in the tags;
arranging at least one group of numbers into an ordered array;
and traversing the ordered array, and acquiring corresponding operation information according to each serial number in the ordered array.
4. The method of claim 3, wherein traversing the ordered array and obtaining the corresponding operation information according to each number in the ordered array specifically comprises:
identifying the type of the label, and determining the data type obtained by the operation information corresponding to the label according to the type of the label;
according to the data type obtained by the operation information, a display area in the report is defined;
searching corresponding operation information through the serial number;
the step of obtaining the data filling report according to the operation information to complete the report comprises the following steps:
and filling the data acquired by the operation information in a display area defined by the report to finish the report.
5. The method of claim 4, wherein: the searching for the corresponding operation information through the number specifically includes:
according to the type of the label, searching an entry corresponding to the number in a data table corresponding to the type;
and extracting and returning corresponding operation information in the entry.
6. The method according to claim 1, wherein the step of obtaining the data-filled report according to the operation information to complete the report specifically comprises:
judging whether the data obtained by the operation information corresponding to the numbers in one label or the numbers in the continuous labels is the data with the same structure, wherein the data with the same structure comprises the same data type and the same arrangement mode;
if the data obtained by the operation information corresponding to the numbers in one label or the numbers in the continuous labels are the data with the same structure, respectively obtaining the data with the same structure through a plurality of distributed databases according to the operation information;
combining a plurality of groups of data with the same type into a group of data aggregate;
replacing one or a plurality of corresponding labels in succession by the combined data collection.
7. The method according to claim 6, wherein the step of determining whether the data obtained by the operation information corresponding to the plurality of numbers in the one label or the plurality of consecutive labels is data with the same structure specifically includes:
when the types of the continuous labels are the same or a plurality of numbers are in the same label, traversing the numbers in the continuous labels or the numbers in the same label to obtain the operation information corresponding to the numbers;
judging whether the fields, or/and parameters, or/and data types of the data table obtained corresponding to the operation information are the same;
and if the fields, or/and the parameters, or/and the data types of the data tables obtained corresponding to the operation information are completely the same, determining that the data obtained corresponding to the operation information corresponding to a plurality of numbers in one label or a plurality of continuous labels are the data with the same structure.
8. A datagram generation apparatus, comprising:
the generating module is used for respectively generating and storing corresponding operation information according to data required by all users, and establishing a label corresponding to the operation information, wherein the operation information comprises statements interacted with a database and a number uniquely identifying the operation information;
the editing module is used for receiving the data required by the user based on the request in the report form, orderly placing the labels with the numbers, and arranging the display structure of the data in the report form;
the translation module is used for reading a label set in the report and determining corresponding operation information according to the number in the label; and
and the display module is used for acquiring the data filling report according to the operation information so as to finish the report.
9. A computer device comprising a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps of a method of generating a datagram as claimed in any of claims 1 to 6.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of a method for generating a datagram as claimed in any one of claims 1 to 6.
CN202010181339.1A 2020-03-16 2020-03-16 Data report generation method and device, computer equipment and storage medium Pending CN111552704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010181339.1A CN111552704A (en) 2020-03-16 2020-03-16 Data report generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010181339.1A CN111552704A (en) 2020-03-16 2020-03-16 Data report generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111552704A true CN111552704A (en) 2020-08-18

Family

ID=72003729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010181339.1A Pending CN111552704A (en) 2020-03-16 2020-03-16 Data report generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111552704A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686010A (en) * 2020-12-23 2021-04-20 江苏苏宁云计算有限公司 Resource data report generation method and device, computer equipment and storage medium
CN113901767A (en) * 2021-10-09 2022-01-07 周晓东 Report merging method, intelligent terminal and storage medium
CN114329164A (en) * 2021-12-31 2022-04-12 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for processing data
CN114626352A (en) * 2022-03-11 2022-06-14 平安科技(深圳)有限公司 Report automatic generation method and device, computer equipment and storage medium
CN115186023A (en) * 2022-09-07 2022-10-14 杭州安恒信息技术股份有限公司 Data set generation method, device, equipment and medium
CN116360881A (en) * 2023-02-23 2023-06-30 南京海泰医疗信息系统有限公司 Data set generation method and device, electronic equipment and storage medium
CN117391456A (en) * 2023-11-27 2024-01-12 浙江南斗数智科技有限公司 Village management method and service platform system based on artificial intelligence

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686010A (en) * 2020-12-23 2021-04-20 江苏苏宁云计算有限公司 Resource data report generation method and device, computer equipment and storage medium
CN112686010B (en) * 2020-12-23 2024-03-01 江苏苏宁云计算有限公司 Resource data report generation method, device, computer equipment and storage medium
CN113901767A (en) * 2021-10-09 2022-01-07 周晓东 Report merging method, intelligent terminal and storage medium
CN114329164A (en) * 2021-12-31 2022-04-12 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for processing data
CN114626352A (en) * 2022-03-11 2022-06-14 平安科技(深圳)有限公司 Report automatic generation method and device, computer equipment and storage medium
CN114626352B (en) * 2022-03-11 2024-02-06 平安科技(深圳)有限公司 Report automatic generation method, device, computer equipment and storage medium
CN115186023A (en) * 2022-09-07 2022-10-14 杭州安恒信息技术股份有限公司 Data set generation method, device, equipment and medium
CN116360881A (en) * 2023-02-23 2023-06-30 南京海泰医疗信息系统有限公司 Data set generation method and device, electronic equipment and storage medium
CN116360881B (en) * 2023-02-23 2024-07-05 南京海泰医疗信息系统有限公司 Data set generation method and device, electronic equipment and storage medium
CN117391456A (en) * 2023-11-27 2024-01-12 浙江南斗数智科技有限公司 Village management method and service platform system based on artificial intelligence
CN117391456B (en) * 2023-11-27 2024-04-05 浙江南斗数智科技有限公司 Village management method and service platform system based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN111552704A (en) Data report generation method and device, computer equipment and storage medium
CN108509400B (en) Document template generation method and device, computer equipment and storage medium
CN105183912B (en) Abnormal log determines method and apparatus
US20020129059A1 (en) XML auto map generator
CN103198074A (en) Page design method and system for dynamic publishing website
CN108628830A (en) A kind of method and apparatus of semantics recognition
CN111914135A (en) Data query method and device, electronic equipment and storage medium
CN105426508A (en) Webpage generation method and apparatus
CN113407785B (en) Data processing method and system based on distributed storage system
CN111553556A (en) Business data analysis method and device, computer equipment and storage medium
CN112650905A (en) Anti-crawler method and device based on label, computer equipment and storage medium
CN111782649A (en) Data acquisition format updating method and device, computer equipment and storage medium
CN110309217B (en) Data import and export method and device, terminal and computer readable storage medium
CN114330240A (en) PDF document analysis method and device, computer equipment and storage medium
CN113283231B (en) Method for acquiring signature bit, setting system, signature system and storage medium
CN111191153A (en) Information technology consultation service display device
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN112685115A (en) International cue language generating method, system, computer equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN111178025A (en) Editing method and device of nuclear power plant operation guide rules, computer equipment and storage medium
CN108228688B (en) Template generation method, system and server based on XBRL
CN105808628A (en) Webpage transcoding method, apparatus and system
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN113504957A (en) Table data processing method and device, computer equipment and storage medium
CN113065086A (en) Webpage text extraction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination