CN111814441A - Report generation method and device, electronic equipment and storage medium - Google Patents

Report generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111814441A
CN111814441A CN202010622588.XA CN202010622588A CN111814441A CN 111814441 A CN111814441 A CN 111814441A CN 202010622588 A CN202010622588 A CN 202010622588A CN 111814441 A CN111814441 A CN 111814441A
Authority
CN
China
Prior art keywords
data
parameters
target
preset
report generation
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
CN202010622588.XA
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 Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010622588.XA priority Critical patent/CN111814441A/en
Publication of CN111814441A publication Critical patent/CN111814441A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to data processing and provides a report generation method and device, electronic equipment and a storage medium. The method can extract a plurality of parameters and logic relations of the parameters from a report generation request, check the parameters, when the parameters pass the check, splice the parameters according to the logic relations to obtain a query condition, determine a target system according to the report generation request, query a database of the target system by using the query condition to obtain target data, determine the number of the target data, when the number is detected to be larger than a preset number, split the target data according to the preset number to obtain a plurality of data sets, fill data to be filled in each data set into a configuration template to obtain a plurality of initial tables, and integrate the initial tables to obtain a target report. In addition, the invention also relates to a block chain technology, and the target report can be stored in the block chain.

Description

Report generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a report generation method and apparatus, an electronic device, and a storage medium.
Background
Currently, in order to facilitate data analysis, data in a system is generally exported and converted into a report form for display. The existing data export mode is that a background developer utilizes plug-ins to export data in a system, however, because the plug-ins are generated according to product requirements in a customized mode, different plug-ins are required to be adopted for exporting data according to different product requirements, so that not only is resource waste caused, but also the export efficiency of the data is reduced, and in addition, the plug-ins cannot support the export of a large amount of data.
Disclosure of Invention
In view of the above, it is necessary to provide a report generating method, apparatus, electronic device and storage medium, which can not only adapt to export data of different product requirements, thereby improving the efficiency of exporting data, but also support exporting a large amount of data.
A report generation method comprises the following steps:
when a report generation request is received, extracting a plurality of parameters and the logical relations of the parameters from the report generation request;
verifying the plurality of parameters;
when the parameters pass the verification, splicing the parameters according to the logical relationship to obtain query conditions;
determining a target system according to the report generation request, and querying a database of the target system by using the query condition to obtain target data;
determining the amount of the target data;
when the number is detected to be larger than a preset number, splitting the target data according to the preset number to obtain a plurality of data sets;
and filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
According to the preferred embodiment of the present invention, the extracting the plurality of parameters and the logical relationship of the plurality of parameters from the report generation request includes:
analyzing the method body in the report generation request to obtain all information carried in the report generation request;
acquiring a plurality of first preset labels, and acquiring information corresponding to the plurality of first preset labels from all the information as the plurality of parameters;
and acquiring a second preset label, and acquiring information corresponding to the second preset label from all the information as the logical relation of the plurality of parameters.
According to the preferred embodiment of the present invention, the report generating method further comprises:
determining a client initiating the report generation request;
acquiring a client identification code of the client, and detecting whether the client passes verification according to the client identification code;
when the client passes the verification, controlling the client to capture a target face;
detecting whether the target face exists in a preset face library or not;
when the target face exists in the preset face library, determining that the report generation request is legal;
and when the report generation request is legal, executing the step of extracting a plurality of parameters and the logical relations of the parameters from the report generation request.
According to a preferred embodiment of the present invention, said verifying said plurality of parameters comprises:
detecting whether the parameters are preset parameter types or not;
when the parameters are the preset parameter types, detecting whether the parameters meet a preset format;
and when the plurality of parameters meet the preset format, determining that the plurality of parameters pass the verification.
According to a preferred embodiment of the present invention, the querying the database of the target system using the query condition to obtain the target data includes:
determining the number of parameters in the query condition;
acquiring a plurality of idle threads from a preset thread connection pool, wherein the number of the threads of the idle threads is the same as the number of the parameters;
screening the data in the database by using the idle threads based on the parameters in the query condition to obtain primary screening data;
and processing the preliminary screening data based on the logical relationship in the query condition to obtain the target data.
According to the preferred embodiment of the present invention, when it is detected that the number is greater than the preset number, the report generating method further includes:
acquiring a data format of the target data;
detecting whether the data format is a preset configuration format or not;
and when the data format is not the configuration format, converting the data format of the target data into the configuration format to obtain the target data with the configuration format, and executing the step of splitting the target data according to the preset quantity.
According to a preferred embodiment of the present invention, the target report is stored in a block chain, and the step of filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables and integrating the plurality of initial tables to obtain the target report includes:
analyzing the first identification field in the configuration template and acquiring a second identification field of each data to be filled;
according to the first identification field and the second identification field, filling the data to be filled in each data set into the configuration template to obtain a plurality of initial forms;
and determining the generation sequence of the plurality of initial tables, and integrating the plurality of initial tables according to the generation sequence to obtain the target report.
A report generating apparatus, the report generating apparatus comprising:
the extraction unit is used for extracting a plurality of parameters and the logical relations of the parameters from the report generation request when the report generation request is received;
a checking unit for checking the plurality of parameters;
the splicing unit is used for splicing the parameters according to the logical relation to obtain a query condition when the parameters pass the verification;
the query unit is used for determining a target system according to the report generation request and querying a database of the target system by using the query condition to obtain target data;
a determination unit configured to determine the amount of the target data;
the splitting unit is used for splitting the target data according to the preset number to obtain a plurality of data sets when the number is detected to be larger than the preset number;
and the execution unit is used for filling the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
An electronic device, the electronic device comprising:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the report generation method.
A computer-readable storage medium having stored therein at least one instruction, the at least one instruction being executable by a processor in an electronic device to implement the report generation method.
According to the technical scheme, the parameters and the logical relations of the parameters are extracted from the report generation request, the parameters and the logical relations can be quickly and accurately obtained from the report generation request, the problem that different plug-ins are adopted to derive data for different product demands can be solved by configuring the uncertain items as the parameters, the parameters can be ensured to meet the preset demands by checking the parameters, the parameters are spliced according to the logical relations, the query conditions can be accurately generated, the target system is determined through the report generation request, the database of the target system is queried according to the query conditions, the target data can be quickly and accurately obtained, and the quantity of the target data can be determined. When the number is larger than the preset number, splitting the target data according to the preset number to obtain a plurality of data sets, and when the number is larger than the preset number, avoiding that the data cannot be exported, filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, improving the export efficiency of the data, integrating the plurality of initial tables to obtain a target report, and improving the integrity of the data in the target report.
Drawings
FIG. 1 is a flowchart illustrating a report generating method according to a preferred embodiment of the present invention.
FIG. 2 is a functional block diagram of a report generation apparatus according to a preferred embodiment of the present invention.
FIG. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart illustrating a report generating method according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The report generation method is applied to one or more electronic devices, where the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and hardware of the electronic devices 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 electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a cloud computing (cloud computing) based cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
S10, when a report generation request is received, extracting a plurality of parameters and the logical relations of the parameters from the report generation request.
In at least one embodiment of the invention, the report generation request may be triggered by an analyst responsible for data analysis.
In at least one embodiment of the present invention, the information carried in the report generation request includes, but is not limited to: the plurality of parameters, the system identification, and the logical relationship.
The system identifier may be used to determine the target system, and the specific form of the system identifier is not limited in this embodiment of the present invention.
In at least one embodiment of the present invention, the plurality of parameters are set by the user according to the service scenario, and the plurality of parameters include, but are not limited to: file name, row number, column number, header name, style, etc.
In at least one embodiment of the present invention, the logical relationship refers to a logic between two of the parameters, and the logical relationship includes, but is not limited to: nested, and, or the like.
In at least one embodiment of the present invention, the extracting, by the electronic device, the plurality of parameters and the logical relationship of the plurality of parameters from the report generation request includes:
the electronic equipment analyzes the method body in the report generation request to obtain all information carried in the report generation request, further, the electronic equipment obtains a plurality of first preset labels and obtains information corresponding to the first preset labels from all the information as the parameters, and further, the electronic equipment obtains a second preset label and obtains information corresponding to the second preset label from all the information as the logical relationship.
The first preset tag and the second preset tag refer to predefined tags, for example: name.
By analyzing the method body of the report generation request, all information carried in the report generation request can be quickly obtained, the analysis speed is improved, the plurality of parameters can be accurately determined through the mapping relation between the plurality of first preset labels and the plurality of parameters, and the logical relation can be accurately determined through the mapping relation between the second preset labels and the logical relation.
In at least one embodiment of the present invention, the report generation method further includes:
the electronic equipment determines a client initiating the report generation request, and further acquires a client identification code of the client, detects whether the client passes the verification according to the client identification code, controls the client to capture a target face when the client passes the verification, further detects whether the target face exists in a preset face library, determines that the report generation request is legal when the target face exists in the preset face library, and performs the step of extracting a plurality of parameters and the logical relationship of the parameters from the report generation request when the report generation request is legal.
Wherein, the client is provided with a camera device.
Through the implementation mode, the report generation request is initiated by the user with the corresponding authority, and the data protection function is achieved.
S11, checking the parameters.
In at least one embodiment of the invention, the electronic device verifying the plurality of parameters comprises:
the electronic equipment detects whether the parameters are preset parameter types or not, when the parameters are the preset parameter types, the electronic equipment detects whether the parameters meet a preset format or not, and when the parameters meet the preset format, the electronic equipment determines that the parameters pass verification.
The preset parameter type and the preset format may be set according to an actual application scenario, for example: the preset parameter type may be an int type or a double type, and the preset format may refer to a format corresponding to the preset parameter type, for example, when the preset parameter type is the int type, the preset format may be a 16-bit value or a 32-bit value.
Through the above embodiment, it can be ensured that the plurality of parameters satisfy the preset parameter types and the formats of the plurality of parameters satisfy the preset formats.
In at least one embodiment of the present invention, when the plurality of parameters are not verified, the electronic device determines a target parameter that is not verified, further, the electronic device generates a prompt message according to the target parameter, and further, the electronic device sends the prompt message to a terminal device of a specified contact.
Through the implementation mode, the appointed contact person can be reminded in time when any parameter fails to be checked.
And S12, when the parameters pass the verification, splicing the parameters according to the logical relationship to obtain the query condition.
In at least one embodiment of the present invention, the query condition is formed by splicing the plurality of parameters according to the logical relationship. For example: the query condition may be parameter a and parameter B or parameter C.
And S13, determining a target system according to the report generation request, and querying a database of the target system by using the query condition to obtain target data.
In at least one embodiment of the invention, the target system includes the database, in which a plurality of data is stored.
In at least one embodiment of the present invention, the electronic device extracts a system identifier from the report generation request, and further, the electronic device determines the target system according to the system identifier.
Through the embodiment, the target system can be determined quickly and accurately.
In at least one embodiment of the present invention, the querying, by the electronic device, a database of the target system by using the query condition to obtain the target data includes:
the electronic equipment determines the number of parameters in the query condition, further acquires a plurality of idle threads from a preset thread connection pool, the number of the threads of the idle threads is the same as the number of the parameters, further, the electronic equipment screens the data in the database by using the idle threads based on the parameters in the query condition to obtain prescreened data, and further, the electronic equipment processes the prescreened data based on the logical relationship in the query condition to obtain the target data.
And storing the idle threads in the preset thread connection pool.
For example: and screening the data in the database based on a query condition A to obtain primary screening data corresponding to the query condition A by 10, 18, 19, 30 and 20, screening the data in the data based on a query condition B to obtain primary screening data corresponding to the query condition B by 19, 30 and 40, and when the logical relationship between the query condition A and the query condition B is an AND relationship, processing the primary screening data to obtain target data by 19 and 30.
By acquiring the idle thread from the preset thread connection pool, the time spent on creating the thread can be reduced, the data screening efficiency is further improved, and accurate target data can be obtained by processing the primary screening data.
And S14, determining the number of the target data.
In at least one embodiment of the present invention, the number refers to the number of the target data, for example: when the target data has a value of 100, 200, 300, 400, the electronic device determines that the number is 4.
And S15, when the number is detected to be larger than the preset number, splitting the target data according to the preset number to obtain a plurality of data sets.
In at least one embodiment of the present invention, the preset number may be set according to an actual application scenario, and in general, the preset number is set to 10000.
In at least one embodiment of the present invention, the splitting, by the electronic device, the target data according to the preset number to obtain a plurality of data sets includes:
the electronic equipment sorts the target data according to the numerical value of the target data to obtain a target queue, the target queue comprises a plurality of target data and a serial number of each target data, the electronic equipment further splits the target queue according to the preset quantity and the serial number to obtain a plurality of sub-queues, and the electronic equipment further converts each sub-queue into a set to obtain a plurality of data sets.
Through the embodiment, the number of data in each data set can be ensured to meet the requirement of the preset number.
In at least one embodiment of the present invention, when it is detected that the number is greater than the preset number, the report generation method further includes:
the electronic equipment obtains a data format of the target data, further, the electronic equipment detects whether the data format is a preset configuration format, when the data format is not the configuration format, the electronic equipment converts the data format of the target data into the configuration format to obtain the target data with the configuration format, and the step of splitting the target data according to the preset quantity is carried out.
Wherein the configuration format may be a CSV format.
Specifically, the electronic device converts the data format of the target data into the configuration format using a fwrite () function.
By converting the data format of the target data into the configuration format, compression of the target data can be achieved.
And S16, filling the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
It is emphasized that, in order to further ensure the privacy and security of the target report, the target report may also be stored in a node of a block chain.
In at least one embodiment of the present invention, each initial table includes data in each data set, and the target report includes data in the plurality of data sets.
In at least one embodiment of the present invention, the storing of the target report in the block chain, the filling, by the electronic device, the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain the target report includes:
the electronic equipment analyzes a first identification field in the configuration template and acquires a second identification field of each data set to be filled, and further, the electronic equipment fills the data set to be filled in the configuration template according to the first identification field and the second identification field to obtain a plurality of initial tables, and further, the electronic equipment determines the generation sequence of the plurality of initial tables and integrates the plurality of initial tables according to the generation sequence to obtain the target report.
For example: the electronic equipment analyzes a first identification field in a configuration template A to obtain a total amount, and obtains that a second identification field of data to be filled (such as a numerical value 19) is a total value, the electronic equipment detects that the total amount and the total value belong to a concept, and further the electronic equipment fills the data to be filled (such as the numerical value 19) into a space corresponding to the first identification field to obtain an initial table.
Through the implementation mode, the plurality of initial tables can be integrated into the target report, and the integrity of data in the target report is improved.
Specifically, the electronic device determining the generation order of the plurality of initial tables includes:
the electronic equipment acquires a log file and determines form labels of the plurality of initial forms, further acquires generation time corresponding to the form labels from the log file, and determines the generation sequence according to the generation time.
In at least one embodiment of the present invention, after obtaining the target report, the method further includes:
and the electronic equipment compresses the target report to obtain a compressed packet, and further sends the compressed packet to the client.
And compressing the target report to improve the sending rate of the compressed packet.
According to the technical scheme, the parameters and the logical relations of the parameters are extracted from the report generation request, the parameters and the logical relations can be quickly and accurately obtained from the report generation request, the problem that different plug-ins are adopted to derive data for different product demands can be solved by configuring the uncertain items as the parameters, the parameters can be ensured to meet the preset demands by checking the parameters, the parameters are spliced according to the logical relations, the query conditions can be accurately generated, the target system is determined through the report generation request, the database of the target system is queried according to the query conditions, the target data can be quickly and accurately obtained, and the quantity of the target data can be determined. When the number is larger than the preset number, splitting the target data according to the preset number to obtain a plurality of data sets, and when the number is larger than the preset number, avoiding that the data cannot be exported, filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, improving the export efficiency of the data, integrating the plurality of initial tables to obtain a target report, and improving the integrity of the data in the target report.
Fig. 2 is a functional block diagram of a report generation apparatus according to a preferred embodiment of the present invention. The report generating device 11 includes an extracting unit 110, a checking unit 111, a splicing unit 112, an inquiring unit 113, a determining unit 114, a splitting unit 115, an executing unit 116, a detecting unit 117, a controlling unit 118, a converting unit 119, a generating unit 120, a sending unit 121, an obtaining unit 122, and a compressing unit 123. The module/unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and that can perform a fixed function, and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When receiving a report generation request, the extracting unit 110 extracts a plurality of parameters and the logical relationship of the parameters from the report generation request.
In at least one embodiment of the invention, the report generation request may be triggered by an analyst responsible for data analysis.
In at least one embodiment of the present invention, the information carried in the report generation request includes, but is not limited to: the plurality of parameters, the system identification, and the logical relationship.
The system identifier may be used to determine the target system, and the specific form of the system identifier is not limited in this embodiment of the present invention.
In at least one embodiment of the present invention, the plurality of parameters are set by the user according to the service scenario, and the plurality of parameters include, but are not limited to: file name, row number, column number, header name, style, etc.
In at least one embodiment of the present invention, the logical relationship refers to a logic between two of the parameters, and the logical relationship includes, but is not limited to: nested, and, or the like.
In at least one embodiment of the present invention, the extracting unit 110 extracts a plurality of parameters and the logical relationships of the parameters from the report generation request, including:
the extracting unit 110 analyzes the method body in the report generation request to obtain all information carried in the report generation request, further, the extracting unit 110 obtains a plurality of first preset tags and obtains information corresponding to the plurality of first preset tags from all information as the plurality of parameters, further, the extracting unit 110 obtains a second preset tag and obtains information corresponding to the second preset tag from all information as the logical relationship.
The first preset tag and the second preset tag refer to predefined tags, for example: name.
By analyzing the method body of the report generation request, all information carried in the report generation request can be quickly obtained, the analysis speed is improved, the plurality of parameters can be accurately determined through the mapping relation between the plurality of first preset labels and the plurality of parameters, and the logical relation can be accurately determined through the mapping relation between the second preset labels and the logical relation.
In at least one embodiment of the present invention, the determining unit 114 determines the client that initiates the report generation request, further, the detecting unit 117 obtains a client identification code of the client, and detects whether the client passes the verification according to the client identification code, when the client passes the verification, the controlling unit 118 controls the client to capture a target face, further, the detecting unit 117 detects whether the target face exists in a preset face library, when the target face exists in the preset face library, the determining unit 114 determines that the report generation request is legal, and when the report generation request is legal, the executing unit 116 proceeds to a step of extracting a plurality of parameters and a logical relationship between the plurality of parameters from the report generation request.
Wherein, the client is provided with a camera device.
Through the implementation mode, the report generation request is initiated by the user with the corresponding authority, and the data protection function is achieved.
The verification unit 111 verifies the plurality of parameters.
In at least one embodiment of the present invention, the verifying unit 111 verifies the plurality of parameters includes:
the checking unit 111 detects whether the parameters are of preset parameter types, when the parameters are of the preset parameter types, the checking unit 111 detects whether the parameters meet a preset format, and when the parameters meet the preset format, the checking unit 111 determines that the parameters pass checking.
The preset parameter type and the preset format may be set according to an actual application scenario, for example: the preset parameter type may be an int type or a double type, and the preset format may refer to a format corresponding to the preset parameter type, for example, when the preset parameter type is the int type, the preset format may be a 16-bit value or a 32-bit value.
Through the above embodiment, it can be ensured that the plurality of parameters satisfy the preset parameter types and the formats of the plurality of parameters satisfy the preset formats.
In at least one embodiment of the present invention, when the plurality of parameters are not verified, the determining unit 114 determines a target parameter that is not verified, further, the generating unit 120 generates a prompt message according to the target parameter, and further, the sending unit 121 sends the prompt message to the terminal device of the specified contact.
Through the implementation mode, the appointed contact person can be reminded in time when any parameter fails to be checked.
When the parameters pass the verification, the splicing unit 112 splices the parameters according to the logical relationship to obtain the query condition.
In at least one embodiment of the present invention, the query condition is formed by splicing the plurality of parameters according to the logical relationship. For example: the query condition may be parameter a and parameter B or parameter C.
The query unit 113 determines a target system according to the report generation request, and queries a database of the target system using the query condition to obtain target data.
In at least one embodiment of the invention, the target system includes the database, in which a plurality of data is stored.
In at least one embodiment of the present invention, the query unit 113 extracts a system identifier from the report generation request, and further, the query unit 113 determines the target system according to the system identifier.
Through the embodiment, the target system can be determined quickly and accurately.
In at least one embodiment of the present invention, the querying unit 113 queries the database of the target system using the query condition, and obtaining the target data includes:
the query unit 113 determines the number of parameters in the query condition, further, the query unit 113 obtains a plurality of idle threads from a preset thread connection pool, the number of the idle threads is the same as the number of the parameters, further, the query unit 113 screens the data in the database by using the idle threads based on the parameters in the query condition to obtain prescreened data, and further, the query unit 113 processes the prescreened data based on a logical relationship in the query condition to obtain the target data.
And storing the idle threads in the preset thread connection pool.
For example: and screening the data in the database based on a query condition A to obtain primary screening data corresponding to the query condition A by 10, 18, 19, 30 and 20, screening the data in the data based on a query condition B to obtain primary screening data corresponding to the query condition B by 19, 30 and 40, and when the logical relationship between the query condition A and the query condition B is an AND relationship, processing the primary screening data to obtain target data by 19 and 30.
By acquiring the idle thread from the preset thread connection pool, the time spent on creating the thread can be reduced, the data screening efficiency is further improved, and accurate target data can be obtained by processing the primary screening data.
The determination unit 114 determines the amount of the target data.
In at least one embodiment of the present invention, the number refers to the number of the target data, for example: when the target data has 100, 200, 300, 400, the determination unit 114 determines that the number is 4.
When it is detected that the number is greater than the preset number, the splitting unit 115 splits the target data according to the preset number to obtain a plurality of data sets.
In at least one embodiment of the present invention, the preset number may be set according to an actual application scenario, and in general, the preset number is set to 10000.
In at least one embodiment of the present invention, the splitting unit 115 splits the target data according to the preset number to obtain a plurality of data sets, where the data sets include:
the splitting unit 115 sorts the target data according to the numerical value of the target data to obtain a target queue, where the target queue includes a plurality of target data and a sequence number of each target data, further, the splitting unit 115 splits the target queue according to the preset number and the sequence number to obtain a plurality of sub-queues, and further, the splitting unit 115 converts each sub-queue into a set to obtain a plurality of data sets.
Through the embodiment, the number of data in each data set can be ensured to meet the requirement of the preset number.
In at least one embodiment of the present invention, when it is detected that the number is greater than the preset number, the obtaining unit 122 obtains a data format of the target data, further, the detecting unit 117 detects whether the data format is a preset configuration format, and when the data format is not the configuration format, the converting unit 119 converts the data format of the target data into the configuration format, obtains the target data with the configuration format, and proceeds to perform the step of splitting the target data according to the preset number.
Wherein the configuration format may be a CSV format.
Specifically, the conversion unit 119 converts the data format of the target data into the configuration format using the fwrite () function.
By converting the data format of the target data into the configuration format, compression of the target data can be achieved.
The execution unit 116 fills the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrates the plurality of initial tables to obtain a target report.
It is emphasized that, in order to further ensure the privacy and security of the target report, the target report may also be stored in a node of a block chain.
In at least one embodiment of the present invention, each initial table includes data in each data set, and the target report includes data in the plurality of data sets.
In at least one embodiment of the present invention, the target report is stored in a block chain, and the executing unit 116 fills the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrates the plurality of initial tables to obtain the target report, where the obtaining of the target report includes:
the execution unit 116 parses the first identification field in the configuration template and obtains the second identification field of each data to be filled, further, the execution unit 116 fills the data to be filled in each data set into the configuration template according to the first identification field and the second identification field to obtain the plurality of initial tables, further, the execution unit 116 determines the generation sequence of the plurality of initial tables and integrates the plurality of initial tables according to the generation sequence to obtain the target report.
For example: the execution unit 116 parses the first identification field in the configuration template a to obtain a "total amount," and obtains that the second identification field of the data to be filled (such as the numerical value 19, etc.) is a "total value," the execution unit 116 detects that the "total amount" and the "total value" belong to a concept, and further, the execution unit 116 fills the data to be filled (such as the numerical value 19, etc.) into a space corresponding to the first identification field to obtain an initial table.
Through the implementation mode, the plurality of initial tables can be integrated into the target report, and the integrity of data in the target report is improved.
Specifically, the determining, by the execution unit 116, the generation order of the plurality of initial tables includes:
the execution unit 116 obtains a log file and determines the form labels of the plurality of initial forms, further, the execution unit 116 obtains the generation time corresponding to the form labels from the log file, and the execution unit 116 determines the generation order according to the generation time.
In at least one embodiment of the present invention, after obtaining the target report, the compressing unit 123 compresses the target report to obtain a compressed packet, and further, the sending unit 121 sends the compressed packet to the client.
And compressing the target report to improve the sending rate of the compressed packet.
According to the technical scheme, the parameters and the logical relations of the parameters are extracted from the report generation request, the parameters and the logical relations can be quickly and accurately obtained from the report generation request, the problem that different plug-ins are adopted to derive data for different product demands can be solved by configuring the uncertain items as the parameters, the parameters can be ensured to meet the preset demands by checking the parameters, the parameters are spliced according to the logical relations, the query conditions can be accurately generated, the target system is determined through the report generation request, the database of the target system is queried according to the query conditions, the target data can be quickly and accurately obtained, and the quantity of the target data can be determined. When the number is larger than the preset number, splitting the target data according to the preset number to obtain a plurality of data sets, and when the number is larger than the preset number, avoiding that the data cannot be exported, filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, improving the export efficiency of the data, integrating the plurality of initial tables to obtain a target report, and improving the integrity of the data in the target report.
Fig. 3 is a schematic structural diagram of an electronic device for implementing a report generation method according to a preferred embodiment of the present invention.
In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program, such as a report generator, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the above-mentioned report generation method embodiments, such as the steps shown in fig. 1.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an extraction unit 110, a check unit 111, a concatenation unit 112, an inquiry unit 113, a determination unit 114, a splitting unit 115, an execution unit 116, a detection unit 117, a control unit 118, a conversion unit 119, a generation unit 120, a transmission unit 121, an acquisition unit 122, and a compression unit 123.
The memory 12 can be used for storing the computer programs and/or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer programs and/or modules stored in the memory 12 and calling data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 12 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a memory having a physical form, such as a memory stick, a TF Card (Trans-flash Card), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Referring to fig. 1, the memory 12 in the electronic device 1 stores a plurality of instructions to implement a report generation method, and the processor 13 can execute the plurality of instructions to implement:
when a report generation request is received, extracting a plurality of parameters and the logical relations of the parameters from the report generation request;
verifying the plurality of parameters;
when the parameters pass the verification, splicing the parameters according to the logical relationship to obtain query conditions;
determining a target system according to the report generation request, and querying a database of the target system by using the query condition to obtain target data;
determining the amount of the target data;
when the number is detected to be larger than a preset number, splitting the target data according to the preset number to obtain a plurality of data sets;
and filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A report generation method is characterized by comprising the following steps:
when a report generation request is received, extracting a plurality of parameters and the logical relations of the parameters from the report generation request;
verifying the plurality of parameters;
when the parameters pass the verification, splicing the parameters according to the logical relationship to obtain query conditions;
determining a target system according to the report generation request, and querying a database of the target system by using the query condition to obtain target data;
determining the amount of the target data;
when the number is detected to be larger than a preset number, splitting the target data according to the preset number to obtain a plurality of data sets;
and filling the data to be filled in each data set into a configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
2. The report generation method according to claim 1, wherein the extracting the plurality of parameters and the logical relationship of the plurality of parameters from the report generation request comprises:
analyzing the method body in the report generation request to obtain all information carried in the report generation request;
acquiring a plurality of first preset labels, and acquiring information corresponding to the plurality of first preset labels from all the information as the plurality of parameters;
and acquiring a second preset label, and acquiring information corresponding to the second preset label from all the information as the logical relation of the plurality of parameters.
3. The report generation method according to claim 1, further comprising:
determining a client initiating the report generation request;
acquiring a client identification code of the client, and detecting whether the client passes verification according to the client identification code;
when the client passes the verification, controlling the client to capture a target face;
detecting whether the target face exists in a preset face library or not;
when the target face exists in the preset face library, determining that the report generation request is legal;
and when the report generation request is legal, executing the step of extracting a plurality of parameters and the logical relations of the parameters from the report generation request.
4. A report generation method according to claim 1, characterized in that said verifying said plurality of parameters comprises:
detecting whether the parameters are preset parameter types or not;
when the parameters are the preset parameter types, detecting whether the parameters meet a preset format;
and when the plurality of parameters meet the preset format, determining that the plurality of parameters pass the verification.
5. The report generating method according to claim 1, wherein the querying the database of the target system using the query condition to obtain the target data comprises:
determining the number of parameters in the query condition;
acquiring a plurality of idle threads from a preset thread connection pool, wherein the number of the threads of the idle threads is the same as the number of the parameters;
screening the data in the database by using the idle threads based on the parameters in the query condition to obtain primary screening data;
and processing the preliminary screening data based on the logical relationship in the query condition to obtain the target data.
6. The report generation method according to claim 1, wherein when it is detected that the number is greater than a preset number, the report generation method further comprises:
acquiring a data format of the target data;
detecting whether the data format is a preset configuration format or not;
and when the data format is not the configuration format, converting the data format of the target data into the configuration format to obtain the target data with the configuration format, and executing the step of splitting the target data according to the preset quantity.
7. The report generation method according to claim 1, wherein the step of filling the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and the step of integrating the plurality of initial tables to obtain the target report comprises the steps of:
analyzing the first identification field in the configuration template and acquiring a second identification field of each data to be filled;
according to the first identification field and the second identification field, filling the data to be filled in each data set into the configuration template to obtain a plurality of initial forms;
and determining the generation sequence of the plurality of initial tables, and integrating the plurality of initial tables according to the generation sequence to obtain the target report.
8. A report generation apparatus, characterized by comprising:
the extraction unit is used for extracting a plurality of parameters and the logical relations of the parameters from the report generation request when the report generation request is received;
a checking unit for checking the plurality of parameters;
the splicing unit is used for splicing the parameters according to the logical relation to obtain a query condition when the parameters pass the verification;
the query unit is used for determining a target system according to the report generation request and querying a database of the target system by using the query condition to obtain target data;
a determination unit configured to determine the amount of the target data;
the splitting unit is used for splitting the target data according to the preset number to obtain a plurality of data sets when the number is detected to be larger than the preset number;
and the execution unit is used for filling the data to be filled in each data set into the configuration template to obtain a plurality of initial tables, and integrating the plurality of initial tables to obtain a target report.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the report generating method according to any of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores at least one instruction, the at least one instruction being executed by a processor in an electronic device to implement the report generating method according to any of claims 1 to 7.
CN202010622588.XA 2020-06-30 2020-06-30 Report generation method and device, electronic equipment and storage medium Pending CN111814441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010622588.XA CN111814441A (en) 2020-06-30 2020-06-30 Report generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010622588.XA CN111814441A (en) 2020-06-30 2020-06-30 Report generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111814441A true CN111814441A (en) 2020-10-23

Family

ID=72855836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010622588.XA Pending CN111814441A (en) 2020-06-30 2020-06-30 Report generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111814441A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463866A (en) * 2020-11-25 2021-03-09 上海中通吉网络技术有限公司 Express delivery industry data exporting method, system, computer and storage medium
CN112882707A (en) * 2021-03-09 2021-06-01 成都新希望金融信息有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN113378531A (en) * 2021-06-11 2021-09-10 携程商旅信息服务(上海)有限公司 Configurable report data processing method, system, equipment and medium
CN114626352A (en) * 2022-03-11 2022-06-14 平安科技(深圳)有限公司 Report automatic generation method and device, computer equipment and storage medium
CN115796768A (en) * 2022-11-15 2023-03-14 蜀道投资集团有限责任公司 Device quality detection table generation method, electronic device and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108434A (en) * 2017-12-19 2018-06-01 福建中金在线信息科技有限公司 A kind of method and device for managing database
CN110222321A (en) * 2019-04-16 2019-09-10 中国平安人寿保险股份有限公司 Report form generation method, device, computer installation and computer readable storage medium
CN110442756A (en) * 2019-06-27 2019-11-12 平安科技(深圳)有限公司 Data verification method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108434A (en) * 2017-12-19 2018-06-01 福建中金在线信息科技有限公司 A kind of method and device for managing database
CN110222321A (en) * 2019-04-16 2019-09-10 中国平安人寿保险股份有限公司 Report form generation method, device, computer installation and computer readable storage medium
CN110442756A (en) * 2019-06-27 2019-11-12 平安科技(深圳)有限公司 Data verification method, device, computer equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463866A (en) * 2020-11-25 2021-03-09 上海中通吉网络技术有限公司 Express delivery industry data exporting method, system, computer and storage medium
CN112882707A (en) * 2021-03-09 2021-06-01 成都新希望金融信息有限公司 Rendering method, rendering device, storage medium and electronic equipment
CN112882707B (en) * 2021-03-09 2024-02-09 成都新希望金融信息有限公司 Rendering method and device, storage medium and electronic equipment
CN113378531A (en) * 2021-06-11 2021-09-10 携程商旅信息服务(上海)有限公司 Configurable report data processing method, system, equipment and medium
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
CN115796768A (en) * 2022-11-15 2023-03-14 蜀道投资集团有限责任公司 Device quality detection table generation method, electronic device and computer readable medium
CN115796768B (en) * 2022-11-15 2023-11-17 蜀道投资集团有限责任公司 Device quality detection table generation method, electronic device, and computer-readable medium

Similar Documents

Publication Publication Date Title
CN111814441A (en) Report generation method and device, electronic equipment and storage medium
CN112035258B (en) Data processing method, device, electronic equipment and medium
CN111901327B (en) Cloud network vulnerability mining method and device, electronic equipment and medium
CN111488363B (en) Data processing method, device, electronic equipment and medium
CN111694840A (en) Data synchronization method, device, server and storage medium
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN112070608B (en) Information processing method, device, medium and electronic equipment
CN112702228B (en) Service flow limit response method, device, electronic equipment and readable storage medium
CN112287329A (en) Service instance checking method and device, electronic equipment and storage medium
CN112669138A (en) Data processing method and related equipment
CN112541009A (en) Data query method and device, electronic equipment and storage medium
CN112329043A (en) Information encryption processing method, device, computer equipment and medium
CN111142863B (en) Page generation method and device
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN112163412A (en) Data verification method and device, electronic equipment and storage medium
CN111796936A (en) Request processing method and device, electronic equipment and medium
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN111814045A (en) Data query method and device, electronic equipment and storage medium
CN112668453A (en) Video identification method and related equipment
CN113536770B (en) Text analysis method, device and equipment based on artificial intelligence and storage medium
CN113918467A (en) Financial system testing method, device, equipment and storage medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN111651363A (en) Test data acquisition method, test data acquisition device, electronic device and medium
CN111277626A (en) Server upgrading method and device, electronic equipment and medium
CN111986771A (en) Medical prescription query 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