CN116932486A - File generation method, device, computer equipment and storage medium - Google Patents

File generation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116932486A
CN116932486A CN202311005493.3A CN202311005493A CN116932486A CN 116932486 A CN116932486 A CN 116932486A CN 202311005493 A CN202311005493 A CN 202311005493A CN 116932486 A CN116932486 A CN 116932486A
Authority
CN
China
Prior art keywords
name
report type
file
target
page
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
CN202311005493.3A
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 Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty 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 Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202311005493.3A priority Critical patent/CN116932486A/en
Publication of CN116932486A publication Critical patent/CN116932486A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Abstract

The application belongs to the field of artificial intelligence and financial science and technology, and relates to a file generation method, which comprises the following steps: if a file generation request is received, displaying a configuration page; receiving report types input by a user on a configuration page; generating a working page name corresponding to the report type, and constructing a working book based on the working page name; acquiring a function name of a data processing function corresponding to the report type; the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in the target code; calling a data processing function to process data based on the reflection function tool class to obtain target data; and based on the report type and the name of the working page, the target data is corresponding to the working book to obtain the target file. The application also provides a file generation device, computer equipment and a storage medium. In addition, the object file of the present application may be stored in a blockchain. The method and the device can be applied to file generation scenes in the financial field, and the generation efficiency of the target file is improved.

Description

File generation method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence development technology and financial technology, and in particular, to a file generating method, apparatus, computer device, and storage medium.
Background
In a traditional file generation mode, data is generally queried, a file name is defined, a style of a file format is set, and then a file is generated through an interface of an Excel parsing tool (EasyExcel) by using JAVA, so that the file generation method is convenient for generating simple Excel files, and one file is generated at a time. However, for a business scenario of generating business report files (such as repayment capability report files) of a finance and technology company, such as an insurance company and a bank, since the business report files are generated multiple report files at a time according to different conditions, if a traditional file generation mode is applied in such a scenario, since only one file is generated at a time, if a large number of files need to be generated, a large amount of disk space is required, and the generation efficiency of the business report files is low.
Disclosure of Invention
The embodiment of the application aims to provide a file generation method, a file generation device, computer equipment and a storage medium, which are used for solving the technical problems that the existing file generation mode only generates one file at a time, if a large number of files need to be generated, a large amount of disk space is required to be occupied, and the generation efficiency of service report files is low.
In order to solve the above technical problems, an embodiment of the present application provides a file generating method, which adopts the following technical scheme:
if a file generation request triggered by a user is received, displaying a preset configuration page;
receiving a report type input by the user on the configuration page;
generating a working page name corresponding to the report type, and constructing a working book based on the working page name;
acquiring a function name of a data processing function corresponding to the report type;
the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code;
calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class to obtain target data;
and correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
Further, the step of correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file specifically includes:
Acquiring a first corresponding relation between the target data and the report type;
acquiring a second corresponding relation between the target data and the name of the working page;
and correspondingly filling the target data into the workbook based on the first corresponding relation and the second corresponding relation to obtain the target file.
Further, the step of receiving the report type input by the user on the configuration page specifically includes:
displaying preset information of various report types in the configuration page;
receiving information selection operation executed by the user in the report type information;
and determining the report type from all the report type information based on the information selecting operation.
Further, the step of generating the name of the working page corresponding to the report type specifically includes:
acquiring name information corresponding to the report type;
and generating a working page name corresponding to the report type based on the name information.
Further, the step of building the workbook based on the workpage name specifically includes:
acquiring the number of the names of the working pages;
acquiring a preset initial workbook template;
Constructing a template of the initial workbook, wherein the template comprises the same number of workpages to obtain the workbook; the working pages and the names of the working pages have a one-to-one correspondence.
Further, before the step of displaying the preset configuration page, the method further includes:
acquiring user information of the user;
calling a preset authority information table;
performing authority verification of file generation processing on the user based on the authority information table and the user information;
and if the authority verification is passed, executing the step of displaying the preset configuration page.
Further, after the step of correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain the target file, the method further includes:
determining a target display mode corresponding to the target file;
and displaying the target file based on the target display mode.
In order to solve the above technical problems, the embodiment of the present application further provides a file generating device, which adopts the following technical scheme:
the first display module is used for displaying a preset configuration page if a file generation request triggered by a user is received;
The receiving module is used for receiving the report type input by the user on the configuration page;
the first processing module is used for generating a working page name corresponding to the report type and constructing a working book based on the working page name;
the first acquisition module is used for acquiring the function name of the data processing function corresponding to the report type;
the transmission module is used for transmitting the report type, the work page name, the function name and the workbook as parameters to a reflection function tool class in a preset target code;
the second processing module is used for calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class so as to obtain target data;
and the generation module is used for correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical schemes:
if a file generation request triggered by a user is received, displaying a preset configuration page;
receiving a report type input by the user on the configuration page;
Generating a working page name corresponding to the report type, and constructing a working book based on the working page name;
acquiring a function name of a data processing function corresponding to the report type;
the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code;
calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class to obtain target data;
and correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
In order to solve the above technical problems, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical schemes:
if a file generation request triggered by a user is received, displaying a preset configuration page;
receiving a report type input by the user on the configuration page;
generating a working page name corresponding to the report type, and constructing a working book based on the working page name;
acquiring a function name of a data processing function corresponding to the report type;
The report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code;
calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class to obtain target data;
and correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in the embodiment of the application, if a file generation request triggered by a user is received, a preset configuration page is displayed first, and the report type input by the user on the configuration page is received; then generating a working page name corresponding to the report type, and constructing a working book based on the working page name; then obtaining the function name of the data processing function corresponding to the report type; subsequently, the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code; further calling a data processing function corresponding to the function name based on the reflection function tool class to perform data processing to obtain target data; and finally, based on the report type and the name of the working page, correspondingly filling the target data into the working book to obtain a target file. The application realizes the rapid generation of the required target file by adopting the reflection function tool class based on the reflection mechanism, thereby improving the generation efficiency of the target file. In addition, by integrating various report types of files to be generated into one target file, occupation of disk space can be effectively reduced, and the generating intelligence of the target file is improved.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a file generation method according to the present application;
FIG. 3 is a schematic diagram of a structure of an embodiment of a file generating apparatus according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with 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 applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases 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. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and 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, the file generating method provided by the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the file generating apparatus is generally disposed in the server/terminal device.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
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 chart of one embodiment of a file generation method according to the present application is shown. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs. The file generation method provided by the embodiment of the application can be applied to any scene needing file generation, and can be applied to products of the scenes, such as file generation in the field of financial insurance. The file generation method comprises the following steps:
step S201, if a file generation request triggered by a user is received, a preset configuration page is displayed.
In this embodiment, the electronic device (for example, the server/terminal device shown in fig. 1) on which the file generation method operates may acquire the file generation request through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection. The file generation request is a request triggered by a user for generating a service report file. The file generation method provided by the application can be applied to business scenes generated by repayment capability report files in the field of financial insurance.
Step S202, receiving the report type input by the user on the configuration page.
In this embodiment, a corresponding service report file type is generated in advance according to the service requirement of the performance, and the service report file type is stored. A report type corresponds to a report file. The report types may include various report types such as S01-repayment capability status table, S02-actual capital table, S03-approved asset table, S04-approved liability table, S05-lowest capital table, LT 01-post-penetration investment asset table, IN 01-personal insurance company interest rate risk, CT 01-concentration risk asset table, base asset MR 01-stock (unsecured and unconditioned underwriting), base asset MR 02-stock (eligible underwriting), base asset MR 12-overseas fixed revenue class asset, base asset MR 13-overseas equity class asset (long term equity investment), base asset MR 14-overseas equity class asset (other equity), base asset CR 03-financial liabilities, base asset CR 04-enterprise liabilities, company liabilities, non-base asset MR 26-overseas non-base asset, non-investment asset CR 18-duty underwriting, and the like. The foregoing specific implementation process of receiving the report type input by the user on the configuration page will be described in further detail in the following specific embodiments, which are not described herein. In addition, if other report files are needed to be added on the current basis, configuration and processing data logic is only needed to be further added, so that the expansibility of file generation processing can be improved.
Step S203, generating a working page name corresponding to the report type, and constructing a working book based on the working page name.
In this embodiment, the specific implementation process of generating the page name corresponding to the report type and constructing the workbook based on the page name will be described in further detail in the following embodiments, which will not be described in any more detail herein.
Step S204, obtaining the function name of the data processing function corresponding to the report type.
In this embodiment, according to the actual data acquisition requirement, data processing functions corresponding to various report types are predefined, and the data processing functions and the report types are stored in correspondence.
Step S205, transmitting the report type, the page name, the function name and the workbook as parameters to a reflection function tool class in a preset object code.
In this embodiment, the reflection function tool class is a function tool class defined by using the property of the reflection mechanism, and in this function, a plurality of parameters may be transmitted, and other parameters may not be fixed except that the method name of processing the data function is necessary. The object code is code generated based on the requirements of the reflection mechanism to generate the file. The reflection mechanism finds out the corresponding method through metadata, and the method is executed after the system state and reflection parameters are checked to be free of problems. That is, the path of a method is normally executed: java code- > class bytecode- > JVM parse bytecode execution class loading process- > class loading to obtain metadata, and when the JVM executes a corresponding method, the JVM finds a path for the corresponding method to start execution and reflect execution according to the metadata. The method and the device have the advantages that only a small amount of object codes are needed to be processed to generate the file, the situation that a large amount of repeated codes exist can be avoided, the code hierarchy is clearer and clearer, and the development colleagues newly receiving the function can understand and maintain more easily, so that the maintenance cost can be reduced.
Step S206, based on the reflection function tool class, calling a data processing function corresponding to the function name to perform data processing, and obtaining target data.
In this embodiment, the target data is processed data obtained by performing data processing using a data processing function.
And step S207, based on the report type and the working page name, correspondingly filling the target data into the working book to obtain a target file.
In this embodiment, the generated target file is a file including a plurality of working pages, so that the time and trouble for searching the file can be saved, the habit of the user is more satisfied, and the customer satisfaction is improved. The specific implementation process of the target file is obtained by correspondingly filling the target data into the workbook based on the report type and the workpage name, which will be described in further detail in the following specific embodiments, and will not be described in any more detail herein.
If a file generation request triggered by a user is received, a preset configuration page is displayed first, and a report type input by the user on the configuration page is received; then generating a working page name corresponding to the report type, and constructing a working book based on the working page name; then obtaining the function name of the data processing function corresponding to the report type; subsequently, the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code; further calling a data processing function corresponding to the function name based on the reflection function tool class to perform data processing to obtain target data; and finally, based on the report type and the name of the working page, correspondingly filling the target data into the working book to obtain a target file. The application realizes the rapid generation of the required target file by adopting the reflection function tool class based on the reflection mechanism, thereby improving the generation efficiency of the target file. In addition, by integrating various report types of files to be generated into one target file, occupation of disk space can be effectively reduced, and the generating intelligence of the target file is improved.
In some alternative implementations, step S207 includes the steps of:
and acquiring a first corresponding relation between the target data and the report type.
In the present embodiment, the target data includes data corresponding to each of the various report types. By performing data processing using the data processing functions associated with the function names of the data processing functions respectively corresponding to the various report types, data respectively corresponding to the various report types can be obtained.
And acquiring a second corresponding relation between the target data and the name of the working page.
In this embodiment, the second correspondence between the target data and the working page name may be obtained based on the correspondence between the target data and the report type and the correspondence between the report type and the working page name.
And correspondingly filling the target data into the workbook based on the first corresponding relation and the second corresponding relation to obtain the target file.
In this embodiment, the target file is obtained by filling target data corresponding to a specified report type into a specified work page corresponding to the specified report type in the workbook. The specified report type is any one of all report types, and the specified working page is a working page which is generated in the workbook and matched with the name of the working page corresponding to the specified report type.
For example, the generation of the payback capability report at the payback capability module of the risk management system may employ the file generation method described above to effect the generation of the payback capability report file. IN this scenario, a file is generated by using a reflection mechanism, S01-S015, IN01, MR01-MR27, CR01-CR18 are referred to as report types, names of the report types are defined as different page names (sheet page names), function names of different processing data are defined according to the types, the file is placed into a configuration, a previously created workbook, report types, page names, function names are placed into tool class functions as entry parameters by using the reflection mechanism, a corresponding data processing function is called according to the entry function names, after the data is processed, the processed data is placed into the workbook according to the entry report types, the sheet page names, and a report file containing a plurality of pages matching the number of the report types is generated.
The method comprises the steps of obtaining a first corresponding relation between target data and report types; acquiring a second corresponding relation between the target data and the name of the working page; and filling the target data into the workbook correspondingly based on the first corresponding relation and the second corresponding relation to obtain the target file. According to the method and the device, the target data is automatically and accurately filled into the workbook in a corresponding mode based on the corresponding relation between the target data and the report type and the name of the working page, so that the target file is obtained, the generation efficiency of the target file is improved, the disk space occupied by the generated target file can be effectively reduced, and the generation intelligence of the target file is improved.
In some alternative implementations of the present embodiment, step S202 includes the steps of:
and displaying preset information of various report types in the configuration page.
In this embodiment, the report type is predefined according to the actual service usage requirement. IN the application scenario of the repayment capability report for the repayment capability calculation IN the financial insurance field, the report type information may include various types such as an S01-repayment capability status table, an S02-actual capital table, an S03-approved asset table, an S04-approved liability table, an S05-lowest capital table, an LT 01-penetrated investment asset table, an IN 01-personal insurance company interest rate risk, a CT 01-concentration risk asset table, a base asset MR 01-stock (unsecured and unsecured), a base asset MR 02-stock (unsecured value), a base asset MR 12-overseas fixed-revenue class asset, a base asset MR 13-overseas equity class asset (long-term equity investment), a base asset MR 14-overseas equity class asset (other equity), a base asset CR 03-financial liability, a base asset CR 04-enterprise liability, a company liability, a non-base asset MR 26-oversea class non-base asset, a non-investment asset CR 18-liability guarantee, and the like.
And receiving an information selection operation executed by the user in the report type information.
In this embodiment, corresponding selection boxes are set at the associated positions of the various report type information, and the user may complete triggering of the information selection operation for the report type information by clicking the selection boxes of the report type information.
And determining the report type from all the report type information based on the information selecting operation.
In this embodiment, the target report type information matching the information selecting operation may be selected by sieving as the report type.
The application displays the preset information of various report types in the configuration page; then receiving information selection operation executed by the user in the report type information; the report type is then determined from all of the report type information based on the information pick operation. According to the application, the preset information of multiple report types is displayed in the configuration page in advance, so that a user can complete the input operation of the report types only by executing the information selection operation in the report type information, thus the user is not required to manually input multiple report types, the workload of the user is reduced, and the generation efficiency and the acquisition efficiency of the report types are improved.
In some alternative implementations, the generating a working page name corresponding to the report type in step S203 includes the steps of:
and acquiring name information corresponding to the report type.
In this embodiment, the name keyword in the report type may be extracted as name information corresponding to the report type.
And generating a working page name corresponding to the report type based on the name information.
In the present embodiment, the name information of the report type may be directly used as the page name corresponding to the report type.
The name information corresponding to the report type is acquired; and further, the working page names corresponding to the report types are generated based on the name information, so that the working page names corresponding to the report types can be quickly generated, the generation efficiency of the working page names of the report types is improved, and the generation standardization of the working page names of the report types is ensured.
In some alternative implementations, the building a workbook based on the workpage names in step S203 includes the steps of:
and acquiring the number of the names of the working pages.
In this embodiment, the number of the page names may be obtained by counting all page names.
And acquiring a preset initial workbook template.
In this embodiment, the initial workbook template is a template for constructing a workbook, which is previously constructed according to actual service usage requirements.
And constructing the workbook template which contains the same number of workpages as the number of workpages, and obtaining the workbook.
In this embodiment, there is a one-to-one correspondence between the working pages and the working page names, that is, one working page corresponds to one working page name.
The method comprises the steps of obtaining the number of the names of the working pages; then acquiring a preset initial workbook template; and constructing the workbook template containing the same number of workpages in the initial workbook template to obtain the workbook. According to the method and the device for constructing the workbook, the number of the workbook names is obtained to construct the workbook of the initial workbook template, so that a required workbook can be quickly and accurately constructed, and the generation efficiency of the workbook is improved.
In some optional implementations of this embodiment, before step S201, the electronic device may further perform the following steps:
and acquiring user information of the user.
In the present embodiment, the user information includes name information of the user.
And calling a preset authority information table.
In this embodiment, the authority information table is a data table which is built in advance and stores the user names and authority levels corresponding to the user names one by one.
And carrying out authority verification of file generation processing on the user based on the authority information table and the user information.
In this embodiment, the target user information matched with the user information may be obtained from the rights information table; then obtaining a target authority level corresponding to the belief of the target user; subsequently obtaining a designated authority level corresponding to file generation processing; judging whether the target authority level is greater than the appointed authority level; if yes, the user is judged to pass the authority verification, otherwise, the user is judged to not pass the authority verification.
And if the authority verification is passed, executing the step of displaying the preset configuration page.
In this embodiment, if the authority verification is not passed, a reminder without authority processing is generated and displayed to the user.
The application obtains the user information of the user; then calling a preset authority information table; subsequently carrying out authority verification of file generation processing on the user based on the authority information table and the user information; and if the authority verification is passed, executing the step of displaying the preset configuration page. Before executing the processing of displaying the preset configuration page, the method intelligently verifies the authority of the file generation processing of the user through the use of the authority information table, and only when the user passes the authority verification, the subsequent file generation flow is performed, so that the safety problem caused by responding to the file generation request of the unauthorized user is avoided, and the processing standardization of the file generation processing is effectively improved.
In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:
and determining a target display mode corresponding to the target file.
In this embodiment, the target display modes may include real-time display, timing display, delay display, and the like. The target display mode can be selected by a user according to personal requirements.
And displaying the target file based on the target display mode.
The application determines the target display mode corresponding to the target file; and displaying the target file based on the target display mode. After the construction of the target file is completed, the target file can be intelligently displayed by using the target display mode corresponding to the target file, so that the display intelligence of the target file is improved, and the use experience of a user is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
It should be emphasized that, to further ensure the privacy and security of the target file, the target file may also be stored in a node of a blockchain.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (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, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a file generating apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 3, the file generating apparatus 300 according to the present embodiment includes: the device comprises a first display module 301, a receiving module 302, a first processing module 303, a first acquisition module 304, a transmission module 305, a second processing module 306 and a generating module 307. Wherein:
the first display module 301 is configured to display a preset configuration page if a file generation request triggered by a user is received;
a receiving module 302, configured to receive a report type input by the user on the configuration page;
a first processing module 303, configured to generate a workpage name corresponding to the report type, and construct a workbook based on the workpage name;
a first obtaining module 304, configured to obtain a function name of a data processing function corresponding to the report type;
a transmission module 305, configured to transmit the report type, the working page name, the function name, and the workbook as parameters to a reflection function tool class in a preset object code;
The second processing module 306 is configured to invoke a data processing function corresponding to the function name to perform data processing based on the reflection function tool class, so as to obtain target data;
and a generating module 307, configured to fill the target data into the workbook correspondingly based on the report type and the workpage name, so as to obtain a target file.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some alternative implementations of the present embodiment, the generating module 307 includes:
the first acquisition sub-module is used for acquiring a first corresponding relation between the target data and the report type;
the second obtaining sub-module is used for obtaining a second corresponding relation between the target data and the name of the working page;
and the first generation sub-module is used for correspondingly filling the target data into the workbook based on the first corresponding relation and the second corresponding relation to obtain the target file.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some alternative implementations of the present embodiment, the receiving module 302 includes:
the display sub-module is used for displaying preset information of various report types in the configuration page;
the receiving sub-module is used for receiving information selection operation executed by the user in the report type information;
and the determining submodule is used for determining the report type from all the report type information based on the information selecting operation.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some alternative implementations of the present embodiment, the first processing module 303 includes:
a third obtaining sub-module, configured to obtain name information corresponding to the report type;
and the second generation sub-module is used for generating a working page name corresponding to the report type based on the name information.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some alternative implementations of the present embodiment, the first processing module 303 includes:
A fourth obtaining sub-module, configured to obtain the number of the working page names;
a fifth obtaining sub-module, configured to obtain a preset initial workbook template;
a construction sub-module, configured to construct a template of the initial workbook, where the template includes the same number of workpages as the number of workpages, so as to obtain the workbook; the working pages and the names of the working pages have a one-to-one correspondence.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some optional implementations of the present embodiment, the file generating apparatus further includes:
the second acquisition module is used for acquiring the user information of the user;
the first calling module is used for calling a preset authority information table;
the verification module is used for verifying the authority of the file generation processing of the user based on the authority information table and the user information;
and the execution module is used for executing the step of displaying the preset configuration page if the authority verification is passed.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In some optional implementations of the present embodiment, the file generating apparatus further includes:
the determining module is used for determining a target display mode corresponding to the target file;
and the second display module is used for displaying the target file based on the target display mode.
In this embodiment, the operations performed by the modules or units respectively correspond to the steps of the file generating method in the foregoing embodiment one by one, which is not described herein again.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a file generating method. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the file generating method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in the embodiment of the application, if a file generation request triggered by a user is received, a preset configuration page is displayed first, and the report type input by the user on the configuration page is received; then generating a working page name corresponding to the report type, and constructing a working book based on the working page name; then obtaining the function name of the data processing function corresponding to the report type; subsequently, the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code; further calling a data processing function corresponding to the function name based on the reflection function tool class to perform data processing to obtain target data; and finally, based on the report type and the name of the working page, correspondingly filling the target data into the working book to obtain a target file. The application realizes the rapid generation of the required target file by adopting the reflection function tool class based on the reflection mechanism, thereby improving the generation efficiency of the target file. In addition, by integrating various report types of files to be generated into one target file, occupation of disk space can be effectively reduced, and the generating intelligence of the target file is improved.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the file generation method as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
in the embodiment of the application, if a file generation request triggered by a user is received, a preset configuration page is displayed first, and the report type input by the user on the configuration page is received; then generating a working page name corresponding to the report type, and constructing a working book based on the working page name; then obtaining the function name of the data processing function corresponding to the report type; subsequently, the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code; further calling a data processing function corresponding to the function name based on the reflection function tool class to perform data processing to obtain target data; and finally, based on the report type and the name of the working page, correspondingly filling the target data into the working book to obtain a target file. The application realizes the rapid generation of the required target file by adopting the reflection function tool class based on the reflection mechanism, thereby improving the generation efficiency of the target file. In addition, by integrating various report types of files to be generated into one target file, occupation of disk space can be effectively reduced, and the generating intelligence of the target file is improved.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. A document generation method, comprising the steps of:
if a file generation request triggered by a user is received, displaying a preset configuration page;
receiving a report type input by the user on the configuration page;
generating a working page name corresponding to the report type, and constructing a working book based on the working page name;
acquiring a function name of a data processing function corresponding to the report type;
the report type, the work page name, the function name and the workbook are used as parameters to be transmitted into a reflection function tool class in a preset target code;
calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class to obtain target data;
and correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
2. The method for generating a file according to claim 1, wherein the step of filling the target data into the workbook correspondingly based on the report type and the page name to obtain the target file specifically comprises:
Acquiring a first corresponding relation between the target data and the report type;
acquiring a second corresponding relation between the target data and the name of the working page;
and correspondingly filling the target data into the workbook based on the first corresponding relation and the second corresponding relation to obtain the target file.
3. The method for generating a file according to claim 1, wherein the step of receiving the report type input by the user on the configuration page specifically comprises:
displaying preset information of various report types in the configuration page;
receiving information selection operation executed by the user in the report type information;
and determining the report type from all the report type information based on the information selecting operation.
4. The file generating method according to claim 1, wherein said step of generating a work page name corresponding to said report type specifically comprises:
acquiring name information corresponding to the report type;
and generating a working page name corresponding to the report type based on the name information.
5. The file generating method according to claim 1, wherein said step of constructing a workbook based on said workpage name comprises:
Acquiring the number of the names of the working pages;
acquiring a preset initial workbook template;
constructing a template of the initial workbook, wherein the template comprises the same number of workpages to obtain the workbook; the working pages and the names of the working pages have a one-to-one correspondence.
6. The document generating method according to claim 1, further comprising, before the step of displaying the preset configuration page:
acquiring user information of the user;
calling a preset authority information table;
performing authority verification of file generation processing on the user based on the authority information table and the user information;
and if the authority verification is passed, executing the step of displaying the preset configuration page.
7. The file generating method according to claim 1, wherein after said step of filling said target data into said workbook based on said report type and said page name to obtain a target file, further comprising:
determining a target display mode corresponding to the target file;
and displaying the target file based on the target display mode.
8. A document generating apparatus, comprising:
The first display module is used for displaying a preset configuration page if a file generation request triggered by a user is received;
the receiving module is used for receiving the report type input by the user on the configuration page;
the first processing module is used for generating a working page name corresponding to the report type and constructing a working book based on the working page name;
the first acquisition module is used for acquiring the function name of the data processing function corresponding to the report type;
the transmission module is used for transmitting the report type, the work page name, the function name and the workbook as parameters to a reflection function tool class in a preset target code;
the second processing module is used for calling a data processing function corresponding to the function name to perform data processing based on the reflection function tool class so as to obtain target data;
and the generation module is used for correspondingly filling the target data into the workbook based on the report type and the workpage name to obtain a target file.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the file generation method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the file generation method of any of claims 1 to 7.
CN202311005493.3A 2023-08-09 2023-08-09 File generation method, device, computer equipment and storage medium Pending CN116932486A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311005493.3A CN116932486A (en) 2023-08-09 2023-08-09 File generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311005493.3A CN116932486A (en) 2023-08-09 2023-08-09 File generation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116932486A true CN116932486A (en) 2023-10-24

Family

ID=88382621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311005493.3A Pending CN116932486A (en) 2023-08-09 2023-08-09 File generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116932486A (en)

Similar Documents

Publication Publication Date Title
CN116956326A (en) Authority data processing method and device, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN116860805A (en) Data processing method, device, computer equipment and storage medium
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN116383787A (en) Page creation method, page creation device, computer equipment and storage medium
CN116681045A (en) Report generation method, report generation device, computer equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN116932486A (en) File generation method, device, computer equipment and storage medium
CN116643884A (en) Data computing method, device, equipment and storage medium based on rule engine
CN117217684A (en) Index data processing method and device, computer equipment and storage medium
CN117395309A (en) Data reporting method, device, computer equipment and storage medium
CN116737437A (en) Data analysis method, device, computer equipment and storage medium
CN116932090A (en) Tool pack loading method, device, computer equipment and storage medium
CN117112665A (en) Link data processing method and device, computer equipment and storage medium
CN116820443A (en) Data analysis method, device, computer equipment and storage medium
CN116701488A (en) Data processing method, device, computer equipment and storage medium
CN115809241A (en) Data storage method and device, computer equipment and storage medium
CN117390119A (en) Task processing method, device, computer equipment and storage medium
CN116795882A (en) Data acquisition method, device, computer equipment and storage medium
CN117251159A (en) Rule page generation method, device, computer equipment and storage medium
CN116911572A (en) Page automation assembly method, system, computer equipment and storage medium
CN117112383A (en) Performance analysis method, device, equipment and storage medium based on artificial intelligence
CN117094827A (en) Data generation method, device, computer 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