File generation method, device, equipment and storage medium
By obtaining template files and element configuration tables to generate target files, the problems of low efficiency in procurement document generation and unstable data quality are solved, a flexible and efficient file generation process is achieved, and the quality and efficiency of procurement documents are improved.
Patent Information
- Application Number
- CN202111531235.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In the existing technology, the generation efficiency of procurement documents is low, the error probability is high, and there is a lack of unified management of data elements in template files, resulting in performance loss and uneven data quality.
By detecting the user's touch operation on the template file, obtaining the template file and its corresponding element configuration table, and generating the target file, the configurability and flexibility of the template file are achieved, and the data quality and work efficiency are improved.
It enhances the flexibility of document generation, reduces the workload of procurement personnel, improves work efficiency, reduces operational risks, and improves data quality.
Smart Images

Figure CN114239528B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer application technology, and in particular to a file generation method, apparatus, device and storage medium. Background Art
[0002] In the procurement management process, various procurement documents, explanatory documents, approval reports and contract agreements (collectively referred to as "procurement documents") are the important basis for the operation of procurement projects, an important carrier for recording procurement results, and the focus of procurement personnel's workload. Procurement personnel need to spend a lot of time compiling procurement documents. Manual compilation is not only inefficient, but also has a high probability of error, and the quality of the data is uneven.
[0003] In the prior art, template files are generated using the interface provided by the Apache POI library, or word documents can be generated through the interface provided by FreeMarker. The principle is mainly to save the word file as an XML file, convert the XML file into a FreeMarker template file, fill the data into the template, and generate the final file.
[0004] Existing technologies lack unified management of data elements within template files and lack a clear, configurable range of data elements. During file generation, they typically query and insert all data elements, which can lead to performance degradation. Furthermore, existing technologies primarily target simple Word and Excel document templates, supporting only simple text insertion. Furthermore, the FreeMarker technology used to generate template files is primarily a toolkit for developers and is not transparent to users. Summary of the Invention
[0005] In view of this, the present invention provides a file generation method, device, equipment and storage medium, which realize the standardization and unification of procurement documents, standardize user operations, standardize data quality, and greatly improve work efficiency.
[0006] In a first aspect, an embodiment of the present invention provides a file generation method, the method comprising:
[0007] Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file;
[0008] Generate a target file based on the first template file and the first element configuration table.
[0009] In a second aspect, an embodiment of the present invention further provides a file generation device, the device comprising:
[0010] A first acquisition module is configured to detect a user's touch operation on a first template file on a display interface, and then acquire the first template file and a first element configuration table corresponding to the first template file;
[0011] The first generating module is used to generate a target file according to the first template file and the first element configuration table.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device comprising: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the file generation method as described in any of the above embodiments.
[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the file generation method as described in any of the above embodiments.
[0014] This solution detects a user's touch operation on a first template file displayed on a display interface, retrieves the first template file and its corresponding first element configuration table, and then generates a target file based on the first template file and the first element configuration table. This solution makes the file generation process configurable and manageable, enhancing its flexibility while minimizing the workload for procurement personnel. This reduces paperwork workload, improves work efficiency, mitigates operational risks, and enhances data quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flowchart of a file generation method provided by Example 1 of the present invention;
[0016] Figure 2 This is a schematic diagram of a first template file in a file generation method provided in Example 1 of the present invention;
[0017] Figure 3 This is a schematic diagram of the technical architecture of a file generation method provided in Example 1 of the present invention;
[0018] Figure 4 This is a structural diagram of a file generation device provided by Embodiment 2 of the present invention;
[0019] Figure 5 This is a structural diagram of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all of the structures. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with one another unless otherwise specified.
[0021] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. When its operation is completed, the process can be terminated, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the features in the embodiments of the present invention and the embodiments can be combined with each other without conflict.
[0022] The term "including" and its variations used in the present invention are open inclusions, that is, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment."
[0023] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and should not be understood as indicating or implying relative importance.
[0024] Example 1
[0025] Figure 1 This is a flowchart of a file generation method provided by the first embodiment of the present invention. This embodiment is applicable to file generation. The method can be executed by the file generation device in the embodiment of the present invention. The device can be implemented in software and / or hardware. Figure 1 As shown, the method specifically includes the following steps:
[0026] S101: Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file.
[0027] Exemplarily, the display interface may refer to an interface displayed on a display screen of a smart terminal such as a mobile phone, iPad, laptop computer or desktop computer.
[0028] In this embodiment, the first template file refers to a template file for file generation created by the user based on the procurement document template. Among them, the procurement document is a general term for procurement documents, instruction documents, approval reports and contract agreements generated in the procurement management process. The document format of the procurement document is mainly Word and Excel documents. In this embodiment, the file format of the first template file can be .wps, .doc or .docx. For example, Figure 2 is a schematic diagram of a first template file in a file generation method provided in Example 1 of the present invention, such as Figure 2 As shown, the first template file 20 includes a cover page 201 and a body page 202. The cover page 201 mainly records information such as the project bidding document's file name, bidding number, and company name, while the body page 202 mainly records the specific contents of the project bidding document, such as the bidding notice, which may include the project name, bidding number, and project introduction.
[0029] It should be noted that the touch operation may refer to a touch control operation performed on the display screen of the smart terminal by a finger, a stylus pen, or a mouse, etc. For example, it may be a double-click operation of a mouse to open a file on a computer display screen.
[0030] It should be explained that the first element configuration table refers to a set of data elements configured by the user according to the needs. Among them, the data elements refer to the business data items queried by the user. For example, Figure 2 As shown, the information such as the file name, tender number and company name of the project tender document recorded in the cover 201 is the data element of the first template file 20, and the data elements are identified in the first template file 20 using the ${XXX} format.
[0031] In actual operation, when a user's touch operation on the first template file on the display interface is detected, the first template file and the first element configuration table corresponding to the first template file are obtained.
[0032] S102: Generate a target file according to the first template file and the first element configuration table.
[0033] It should be noted that the target file refers to the final document generated according to the first template file and the first element configuration table in accordance with the user's own needs.
[0034] Specifically, the content in the first element configuration table is filled into the designated position of the first template file accordingly, and the target file is generated according to the first template file and the first element configuration table.
[0035] This solution detects a user's touch operation on a first template file displayed on a display interface, retrieves the first template file and its corresponding first element configuration table, and then generates a target file based on the first template file and the first element configuration table. This solution makes the file generation process configurable and manageable, enhancing its flexibility while minimizing the workload for procurement personnel. This reduces paperwork workload, improves work efficiency, mitigates operational risks, and enhances data quality.
[0036] Optionally, before detecting a user's touch operation on the first template file on the display interface, obtaining the first template file and the first element configuration table corresponding to the first template file, the method further includes:
[0037] When a user touch operation on the element configuration table template on the display interface is detected, the element configuration table template is obtained.
[0038] In this embodiment, the element configuration table template can be a template for an element configuration table preset based on the data elements required in the procurement management business process. The element configuration table template file format can be an .xls file, which contains two pages corresponding to tabs. The first tab in the element configuration table template is the data source tab. The page corresponding to the data source tab serves as a database for storing data elements, including all data elements required in the procurement management business process. For example, the page content corresponding to the first tab in the element configuration table template is shown in Table 1.
[0039] Table 1
[0040]
[0041]
[0042] In this embodiment, the second tab in the element configuration table template is the element configuration table tab. The data elements on the page corresponding to the second tab are derived from the data elements on the first tab. Therefore, the data elements on the page corresponding to the second tab are less than or equal to the data elements on the page corresponding to the first tab. For example, the page content corresponding to the second tab in the element configuration table template is shown in Table 2.
[0043] Table 2
[0044]
[0045]
[0046] Specifically, before detecting a user's touch operation on the first template file on the display interface, obtaining the first template file and the first element configuration table corresponding to the first template file, detecting a user's touch operation on the element configuration table template on the display interface, obtaining the element configuration table template, including obtaining the page content corresponding to the first tab and the second tab in the element configuration table template.
[0047] When a user selection operation on a target data element in the element configuration table template is detected, a target element configuration table is generated based on the target data element and the element configuration table template.
[0048] It should be noted that target data elements refer to the data elements selected by the user in the element configuration table template according to their own needs. Target data elements include: transaction name and / or field name.
[0049] In this embodiment, the method of selecting the target data element can be, for example, clicking on the table under the transaction name and / or field name on the page corresponding to the second tab in the element configuration table template, and then the specific transaction name and / or field name that is pre-set from the page corresponding to the first tab in the element configuration table template will appear accordingly. The transaction name can be, for example, the procurement plan basic information query business and procurement content information query business in Table 2, and the field name can be, for example, the package number, package name and package creation time in Table 2. The user makes a selection according to needs, and after selection, the selected transaction name and / or field name will be automatically filled in the table under the transaction name and / or field name on the page corresponding to the second tab in the element configuration table template.
[0050] It should be noted that the target element configuration table refers to the element configuration table that is filled in after the user selects the target data element in the element configuration table template according to needs.
[0051] Specifically, when it is detected that the user has selected the target data element in the page corresponding to the second tab in the element configuration table template, a target element configuration table is generated according to the target data element and the element configuration table template.
[0052] Build a target template file based on the target feature configuration table.
[0053] It should be explained that the target template file refers to the template file formed after the content of the target element configuration table is filled in the corresponding position in the first template file.
[0054] The target template file includes a target identifier. In this embodiment, the target identifier refers to the identification information used to identify the data element in the target template file, and the target identifier includes the target data element. The target identifier can be, for example, Figure 2“${package name}”, “${package number}” and “${package creation time}” on the cover 201 in the first template file 20.
[0055] Specifically, according to the content in the target element configuration table, the corresponding positions in the first template file are filled to construct the target template file.
[0056] The target template file and the target element configuration table are associated and stored, and displayed on the display interface.
[0057] In this embodiment, associative storage may refer to associating the target template file and the target element configuration table when they are stored. For example, when the storage address of the target template file is changed, the storage address of the target element configuration table corresponding to the target template file is also changed accordingly, and vice versa.
[0058] Specifically, the target template file and the target element configuration table corresponding to the target template file are associated and stored, and displayed on the display interface of the smart terminal.
[0059] Optionally, when a user touch operation on a first template file on a display interface is detected, obtaining the first template file and a first element configuration table corresponding to the first template file includes:
[0060] When a user touch operation on the first template file on the display interface is detected, the first template file is read.
[0061] Specifically, when a user's touch operation on the first template file on the display interface is detected, the first template file is read.
[0062] If the format of the first template file is the first format, the first element configuration table is read.
[0063] It should be noted that the first format refers to the file format of the first template file, for example, it can be .wps, .doc or .docx format.
[0064] Specifically, after reading the first template file, the file format of the first template file is detected. If the format of the first template file is the first format, the first element configuration table is read.
[0065] Optionally, generating a target file according to the first template file and the first element configuration table includes:
[0066] If the format of the first element configuration table is the second format and the format of the first element configuration table meets the requirements, then obtain the first data element corresponding to the first element configuration table.
[0067] It should be noted that the second format refers to the file format of the first element configuration table, for example, it can be .et, .xls or .xlsx format.
[0068] In this embodiment, the first data element refers to a data element in a first element configuration table.
[0069] Specifically, if the format of the first element configuration table is the second format and the format and content of the first element configuration table meet the requirements, the first data element corresponding to the first element configuration table is obtained, wherein the first data element includes a transaction name and / or a field name.
[0070] Add a first data element to the first set.
[0071] It should be explained that the first set refers to a set consisting of the first data elements corresponding to the first element configuration table.
[0072] Specifically, after obtaining the first data element corresponding to the first element configuration table, the first data element is added to the first set.
[0073] The database is queried according to the first data element in the first set to obtain the first data.
[0074] It should be noted that the database refers to the data source in the page corresponding to the first tab data source tab in the above-mentioned element configuration table template.
[0075] In this embodiment, the first data refers to the data corresponding to the first data element in the database obtained after querying the database according to the first data element in the first set.
[0076] Specifically, the first data is obtained by querying the database based on the first data element in the first set. For example, if the first data element in the first set is a basic information query for a procurement plan, the first data obtained after querying the database includes the package number, package name, package creation time, demand acceptance time, user demand department, contract signing department, business supervisory department, basic project information, procurement method, entrusted bidding agent procurement, and bidding agency company.
[0077] The first data is added to the second set.
[0078] The second set refers to a set consisting of the first data.
[0079] Specifically, after querying the database according to the first data element in the first set to obtain the first data, the obtained first data is added to the second set.
[0080] The first identifier in the first template file is replaced based on the first data in the second set.
[0081] It should be explained that the first identifier refers to the identification information in the first template file, such as "${package name}", "${package number}" and "${package creation time}".
[0082] Specifically, based on the first data in the second set, the corresponding first identification content in the first template file is replaced.
[0083] Optionally, if the format of the first element configuration table is the second format and the format of the first element configuration table meets the requirements, obtaining the first data element corresponding to the first element configuration table includes:
[0084] If the format of the first element configuration table is the second format, the first data element in the first element configuration table is obtained.
[0085] Specifically, if the format of the first element configuration table is the second format, the first data element in the page corresponding to the second tab in the first element configuration table is obtained.
[0086] If the first data element is within the data element range of the page corresponding to the first tab, the first data element corresponding to the first element configuration table is obtained.
[0087] It should be noted that the first tab refers to the data source tab in the first element configuration table.
[0088] Specifically, if the first data element is within the data element range of the page corresponding to the first tab, that is, the data source contains the first data element, then the first data element corresponding to the first element configuration table is obtained.
[0089] Optionally, generating a target file according to the first template file and the first element configuration table includes:
[0090] Get the first identifier of the first template file.
[0091] Among them, the first identifier includes: the first data element.
[0092] Specifically, after obtaining the first template file, a first identifier of the first template file is obtained, such as "${package name}", "${package number}", and "${package creation time}". The first identifier includes a first data element, and the first data element includes a transaction name and / or a field name.
[0093] The database is queried according to the first data element to obtain target data corresponding to the first data element.
[0094] It should be noted that the target data refers to the data corresponding to the first data element in the database.
[0095] Specifically, the database is queried according to the first data element to obtain the target data in the database corresponding to the first data element.
[0096] Replace the first identifier in the first template file with the target data.
[0097] Specifically, the first identifier in the first template file is replaced with the corresponding target data.
[0098] In actual operation, the first identifier of the first template file is obtained, and the database is queried based on the first data element to obtain the target data corresponding to the first data element. The first identifier in the first template file is then replaced. Searching and filling the target data according to the first identifier in the first template file can make the search and filling of the target data more accurate, standardize data quality, and greatly improve work efficiency.
[0099] Optionally, generating a target file according to the first template file and the first element configuration table includes:
[0100] According to the first data element in the first element configuration table, the database is queried to obtain the target data corresponding to the first data element.
[0101] Specifically, the database is queried according to the first data element in the first element configuration table to obtain the target data in the database corresponding to the first data element.
[0102] Fill the target data into the first template file.
[0103] Specifically, the obtained target data are filled into corresponding positions in the first template file respectively.
[0104] In actual operation, the database is queried based on the first data element in the first element configuration table to obtain the target data corresponding to the first data element in the database, and the target data is then populated into the first template file. When querying the database based on the first data element in the first element configuration table, the required target data can be obtained in one go, eliminating the need to search and populate the target data multiple times based on the first identifier in the first template file. This helps users reduce paperwork workload, significantly improves work efficiency, reduces operational risks, and enhances data quality.
[0105] As an exemplary description of this embodiment, Figure 3 This is a schematic diagram of the technical architecture of a file generation method provided by the first embodiment of the present invention, which explains the file generation method provided by the first embodiment of the present invention from the software level. Figure 3 As shown, the technical architecture of a file generation method provided by the first embodiment of the present invention includes a presentation layer 301 , a control layer 302 , a service layer 303 , a support layer 304 and a basic layer 305 .
[0106] The presentation layer 301 mainly uses HTML (Hyper Text Markup Language), JS (short for JavaScript, a programming language) and Jquery (a fast and concise JavaScript framework) technologies.
[0107] The control layer 302 mainly adopts SpringMVC (MVC is the abbreviation of Model, View and Controller, which is an architectural pattern of Web-side services) technology. SpringMVC is a module of the Spring framework and is a webframework module based on MVC.
[0108] The service layer 303 mainly adopts Apache POI (POI is the abbreviation of Point of Interest. Apache POI is an open source library of the Apache Software Foundation. POI provides an application program interface for Java programs to read and write Microsoft Office format files, and is compatible with reading and writing Kingsoft WPS and ET format files), Java IO stream (IO is the abbreviation of input and output. Java IO stream is a computer term. Java IO is the basis for implementing input and output, which can facilitate the input and output of user data), and Java File (Java File interface. The Java file class represents file names and directory path names in an abstract way. This interface is mainly used for creating files and directories, searching files, and deleting files).
[0109] The support layer 304 mainly adopts Mybatis (an excellent persistence layer framework that supports common SQL queries, stored procedures and advanced mapping) technology.
[0110] The base layer 305 is mainly a file storage.
[0111] In this embodiment, the front end adopts technologies such as JS, JQuery and H5 (HTML5.0, Hypertext 5.0), and the back end mainly relies on the SpringMVC-Mybatis (an integrated framework) architecture, and applies interfaces such as Apache POI, Java File and Java IO stream to realize file generation.
[0112] In the file generation method, the specific functions of the presentation layer 301, the control layer 302, the service layer 303, the support layer 304, and the base layer 305 are as follows:
[0113] The system user downloads the first element configuration table configuration data elements in the presentation layer 301, and creates a first template file for uploading; the control layer 302 and the service layer 303 parse and process the first element table configuration and the first template file, convert them into structured data, query the database according to the target data elements configured by the user, return the target data, fill it into the first template file, and the generated target template file is stored in the file storage of the basic layer 305 and returned to the system user. The support layer 304 provides technical support for the entire process of file generation.
[0114] Example 2
[0115] Figure 4 This is a schematic diagram of the structure of a file generation device provided by the second embodiment of the present invention. The device is suitable for file generation. The device can be implemented by hardware / software and can be configured in a server to implement a file generation method in the embodiment of the present invention. Figure 4 As shown, the device specifically includes: a first acquisition module 401 and a first generation module 402.
[0116] The first acquisition module 401 is configured to detect a user's touch operation on a first template file on a display interface, and then acquire the first template file and a first element configuration table corresponding to the first template file;
[0117] The first generating module 402 is configured to generate a target file according to the first template file and the first element configuration table.
[0118] This solution detects a user's touch operation on a first template file displayed on a display interface, retrieves the first template file and its corresponding first element configuration table, and then generates a target file based on the first template file and the first element configuration table. This solution makes the file generation process configurable and manageable, enhancing its flexibility while minimizing the workload for procurement personnel. This reduces paperwork workload, improves work efficiency, mitigates operational risks, and enhances data quality.
[0119] Furthermore, the file generating device further includes:
[0120] a second acquisition module configured to, before detecting a user touch operation on a first template file on a display interface and acquiring the first template file and a first element configuration table corresponding to the first template file, acquire the element configuration table template upon detecting a user touch operation on the element configuration table template on the display interface;
[0121] a second generating module configured to, upon detecting a user touch operation on a first template file on a display interface, generate a target element configuration table based on the target data element and the element configuration table template before acquiring the first template file and the first element configuration table corresponding to the first template file; wherein the target data element includes: a transaction name and / or a field name;
[0122] a construction module, configured to, upon detecting a user's touch operation on a first template file on a display interface, construct a target template file according to the target element configuration table before acquiring the first template file and a first element configuration table corresponding to the first template file, wherein the target template file includes: a target identifier, and the target identifier includes: the target data element;
[0123] The processing module is used to associate and store the target template file and the target element configuration table before obtaining the first template file and the first element configuration table corresponding to the first template file when detecting the user's touch operation on the first template file on the display interface, and display them on the display interface.
[0124] Furthermore, the first acquisition module 401 includes:
[0125] A first reading unit is configured to read the first template file upon detecting a user's touch operation on the first template file on the display interface;
[0126] The second reading unit is configured to read the first element configuration table if the format of the first template file is the first format.
[0127] Furthermore, the first generating module 402 includes:
[0128] a first acquiring unit, configured to acquire a first data element corresponding to the first element configuration table if the format of the first element configuration table is the second format and the format of the first element configuration table meets the requirement;
[0129] a first adding unit, configured to add the first data element to a first set;
[0130] A first query unit, configured to query a database according to a first data element in the first set to obtain first data;
[0131] a second adding unit, configured to add the first data to a second set;
[0132] A first replacing unit is configured to replace a first identifier in the first template file based on first data in the second set.
[0133] Furthermore, the first acquiring unit includes:
[0134] a first acquiring subunit, configured to acquire a first data element in the first element configuration table if the format of the first element configuration table is a second format;
[0135] The second acquisition subunit is configured to acquire the first data element corresponding to the first element configuration table if the first data element is within a data element range on the page corresponding to the first tab.
[0136] Furthermore, the first generating module 402 includes:
[0137] A second acquiring unit is configured to acquire a first identifier of the first template file, wherein the first identifier includes: a first data element;
[0138] a second query unit, configured to query a database according to the first data element to obtain target data corresponding to the first data element;
[0139] The second replacing unit is configured to replace the first identifier in the first template file with the target data.
[0140] Furthermore, the first generating module 402 includes:
[0141] a third query unit, configured to query a database according to the first data element in the first element configuration table to obtain target data corresponding to the first data element;
[0142] A filling unit is used to fill the target data into the first template file.
[0143] The above-mentioned file generation device can execute the file generation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the file generation method.
[0144] Example 3
[0145] Figure 5 This is a schematic diagram of the structure of an electronic device provided by the third embodiment of the present invention. Figure 5 As shown, the electronic device includes a processor 501, a memory 502, an input device 503 and an output device 504; the number of processors 501 in the electronic device can be one or more. Figure 5 In the figure, a processor 501 is used as an example; the processor 501, the memory 502, the input device 503 and the output device 504 in the electronic device can be connected by a bus or other means. Figure 5 The bus connection is taken as an example.
[0146] The memory 502 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules, such as the program instructions / modules corresponding to the file generation method in the embodiments of the present invention (for example, the first acquisition module 401 and the first generation module 402 in the file generation device). The processor 501 executes the software programs, instructions, and modules stored in the memory 502 to execute various functional applications and data processing of the electronic device, that is, to implement the file generation method provided by the above-mentioned embodiments of the present invention:
[0147] Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file;
[0148] Generate a target file based on the first template file and the first element configuration table.
[0149] The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal, etc. In addition, the memory 502 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 502 may further include a memory remotely located relative to the processor 501, and these remote memories may be connected to the device / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0150] The input device 503 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 504 may include a display device such as a display screen.
[0151] Example 4
[0152] A fourth embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the file generation method provided in the embodiment of the present invention is implemented. The method includes:
[0153] Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file;
[0154] Generate a target file based on the first template file and the first element configuration table.
[0155] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.
[0156] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0157] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0158] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0159] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A file generation method, characterized in that: include: Detecting a user's touch operation on an element configuration table template on a display interface, obtaining the element configuration table template, wherein the element configuration table template includes two tabs: a first tab is a data source tab, and a page corresponding to the data source tab is a database storing data elements; and a second tab is an element configuration table tab, wherein the data elements in the page corresponding to the second tab are derived from the data elements in the first tab, and the data elements in the page corresponding to the second tab are less than or equal to the data elements in the page corresponding to the first tab. Detecting a user click operation on a target data element in a page corresponding to the second tab in the element configuration table template, displaying a preset corresponding target data element from a page corresponding to the first tab in the element configuration table template, and generating a target element configuration table based on the target data element selected by the user and the element configuration table template, wherein the target data element includes: a transaction name and / or a field name, and the transaction corresponding to the transaction name includes at least one field; Constructing a target template file according to the target element configuration table, wherein the target template file includes: a target identifier, and the target identifier includes: the target data element; The target template file and the target element configuration table are associated and stored, and displayed on a display interface; Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file; Generate a target file based on the first template file and the first element configuration table.
2. The method according to claim 1, characterized in that Detecting a user's touch operation on a first template file on a display interface, obtaining the first template file and a first element configuration table corresponding to the first template file, including: Detecting a user's touch operation on the first template file on the display interface, reading the first template file; If the format of the first template file is the first format, the first element configuration table is read.
3. The method according to claim 2, characterized in that Generating a target file according to the first template file and the first element configuration table includes: If the format of the first element configuration table is the second format and the format of the first element configuration table meets the requirement, obtaining the first data element corresponding to the first element configuration table; adding the first data element to a first set; querying a database according to the first data element in the first set to obtain first data; adding the first data to the second set; The first identifier in the first template file is replaced based on the first data in the second set.
4. The method according to claim 3, characterized in that If the format of the first element configuration table is the second format and the format of the first element configuration table meets the requirement, obtaining the first data element corresponding to the first element configuration table includes: If the format of the first element configuration table is the second format, obtaining the first data element in the first element configuration table; If the first data element is within the data element range of the page corresponding to the first tab, the first data element corresponding to the first element configuration table is obtained.
5. The method according to claim 1, characterized in that Generating a target file according to the first template file and the first element configuration table includes: Obtaining a first identifier of the first template file, wherein the first identifier includes: a first data element; querying a database according to the first data element to obtain target data corresponding to the first data element; The first identifier in the first template file is replaced with the target data.
6. The method according to claim 1, characterized in that Generating a target file according to the first template file and the first element configuration table includes: querying a database according to the first data element in the first element configuration table to obtain target data corresponding to the first data element; Fill the target data into the first template file.
7. A file generating device, characterized in that: include: A second acquisition module is configured to detect a user's touch operation on an element configuration table template on a display interface, and then acquire the element configuration table template, wherein the element configuration table template includes two tabs, the first tab being a data source tab, the page corresponding to the data source tab being a database storing data elements, and the second tab being an element configuration table tab, the data elements in the page corresponding to the second tab being derived from the data elements in the first tab, and the data elements in the page corresponding to the second tab being less than or equal to the data elements in the page corresponding to the first tab; A second generating module is configured to detect a user click operation on a target data element in a page corresponding to the second tab in the element configuration table template, display a preset corresponding target data element from a page corresponding to the first tab in the element configuration table template, and generate a target element configuration table based on the target data element selected by the user and the element configuration table template, wherein the target data element includes: a transaction name and / or a field name, and the transaction corresponding to the transaction name includes at least one field; A construction module is used to construct a target template file according to the target element configuration table, wherein the target template file includes: a target identifier, and the target identifier includes: the target data element; A processing module, configured to associate and store the target template file and the target element configuration table, and display them on a display interface; A first acquisition module is configured to detect a user's touch operation on a first template file on a display interface, and then acquire the first template file and a first element configuration table corresponding to the first template file; The first generating module is used to generate a target file according to the first template file and the first element configuration table.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the processors are enabled to implement the file generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the file generation method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Contract text generation method and device, computer equipment and storage medium
CN109815471A
Report generation system and method based on online creation templates and online specified data
CN111178027A
Contract template management method and system and contract text making method and system
CN112613291A