Document generation method, device, computer equipment and storage medium
Through the automated document generation method, in response to the document generation instructions, the generation time and reporting system are obtained, the main table template of the matching target declaration time limit is queried, the main body of the compilation is determined, and the comparison information is extracted from the historical record. If the comparison information does not meet the conditions, the documents are generated and compiled based on the preset configuration data, which solves the problem of repeated document generation in traditional technology and improves the efficiency of document generation.
Patent Information
- Application Number
- CN202210292651.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-03-24
AI Technical Summary
Traditional technology requires manual configuration information when preparing funding plans, resulting in duplicate generation of documents and low efficiency.
By responding to document generation instructions, obtain the generation time and reporting system, query the main table template for matching target declaration time limit, determine the main body of the reporting, and extract the comparison information from the historical record. If the comparison information does not meet the conditions, the pre-set configuration data will be generated and compiled.
Reduce the number of documents generated, avoid duplicate generation of existing documents compiled, and improve the efficiency of document generation.
Smart Images

Figure CN114663207B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a document generation method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of computer technology, when compiling a plan (taking a capital plan as an example), it is necessary to issue a plan compilation document to the plan compiling personnel so that the compiling personnel can fill in the capital plan according to the plan compilation document. In traditional technology, each time a capital plan is compiled, the configuration information is manually set in the system, and the system generates a document according to the manually set configuration information. Traditional technology regenerates the document each time a capital plan is compiled, and the generated document may already exist in the system, resulting in duplicate generation of documents and low efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a document generation method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve generation efficiency in response to the above technical problems.
[0004] In a first aspect, the present application provides a method for generating a document. The method comprises:
[0005] In response to a document generation instruction, obtaining a generation time and a reporting system of the document generation instruction;
[0006] Among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, query the main table template corresponding to the target reporting time limit;
[0007] Determine the reporting entity corresponding to the main table template;
[0008] Query the historical records corresponding to the reporting entity, and extract comparison information from the historical records;
[0009] If the comparison information does not meet the comparison conditions, a compilation document corresponding to the compilation subject is generated based on the preset configuration data.
[0010] In a second aspect, the present application also provides a document generation device. The device comprises:
[0011] An acquisition module, for acquiring, in response to a document generation instruction, a generation time and a reporting system of the document generation instruction;
[0012] A query module, used for querying the main table template corresponding to the target reporting time limit if there is a target reporting time limit matching the generation time in each reporting time limit corresponding to the reporting system;
[0013] A determination module, used to determine the reporting subject corresponding to the main table template;
[0014] An extraction module, used to query the historical records corresponding to the reporting subject and extract comparison information from the historical records;
[0015] A generating module is used to generate a compilation document corresponding to the compilation subject based on preset configuration data if the comparison information does not meet the comparison conditions.
[0016] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0017] In response to a document generation instruction, obtaining a generation time and a reporting system of the document generation instruction;
[0018] Among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, query the main table template corresponding to the target reporting time limit;
[0019] Determine the reporting entity corresponding to the main table template;
[0020] Query the historical records corresponding to the reporting entity, and extract comparison information from the historical records;
[0021] If the comparison information does not meet the comparison conditions, a compilation document corresponding to the compilation subject is generated based on the preset configuration data.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0023] In response to a document generation instruction, obtaining a generation time and a reporting system of the document generation instruction;
[0024] Among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, query the main table template corresponding to the target reporting time limit;
[0025] Determine the reporting entity corresponding to the main table template;
[0026] Query the historical records corresponding to the reporting entity, and extract comparison information from the historical records;
[0027] If the comparison information does not meet the comparison conditions, a compilation document corresponding to the compilation subject is generated based on the preset configuration data.
[0028] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0029] In response to a document generation instruction, obtaining a generation time and a reporting system of the document generation instruction;
[0030] Among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, query the main table template corresponding to the target reporting time limit;
[0031] Determine the reporting entity corresponding to the main table template;
[0032] Query the historical records corresponding to the reporting entity, and extract comparison information from the historical records;
[0033] If the comparison information does not meet the comparison conditions, a compilation document corresponding to the compilation subject is generated based on the preset configuration data.
[0034] The above-mentioned document generation method, device, computer device, storage medium and computer program product, in response to the document generation instruction, obtain the generation time and the compilation system of the document generation instruction; among the declaration time limits corresponding to the compilation system, if there is a target declaration time limit that matches the generation time, it means that the declaration time of the compilation document that needs to be filled in under the compilation system has arrived, so the computer device queries the main table template corresponding to the target declaration time limit, and determines the compilation subject corresponding to the main table template. The computer device queries the historical records corresponding to the compilation subject, so that it can be judged whether the compilation document to be generated already exists based on the historical records. The computer device extracts comparison information from the historical documents; if the comparison information does not meet the comparison conditions, it means that the compilation document to be generated has not been allocated, and the compilation document does not exist in the system, so the computer device generates the compilation document corresponding to the compilation subject based on the preset configuration data. The computer device generates the compilation document only when the comparison information does not meet the comparison conditions, which reduces the number of document generation, avoids repeated generation of existing compilation documents, and improves the efficiency of document generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 An application environment diagram of a document generation method in an embodiment;
[0036] Figure 2 A schematic diagram of a process of generating a document in one embodiment;
[0037] Figure 3 A schematic diagram of a historical record in one embodiment;
[0038] Figure 4A schematic diagram of the relationship between a funding plan, a reporting system, and a reporting type in an embodiment;
[0039] Figure 5 A schematic diagram of the principle of a document generation method in an embodiment;
[0040] Figure 6 A schematic diagram of a flow chart of a document generation method in another embodiment;
[0041] Figure 7 It is a structural block diagram of a document generating device in one embodiment;
[0042] Figure 8 It is a structural block diagram of a document generating device in another embodiment;
[0043] Fig. 9 is an internal structure diagram of a computer device in one embodiment;
[0044] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] The document generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the data storage system can store the data that the computer device 102 needs to process. The data storage system can be integrated on the computer device 102, or it can be placed on the cloud or other network servers. The computer device 102 responds to the document generation instruction, obtains the generation time and the compilation system of the document generation instruction; in each declaration time limit corresponding to the compilation system, if there is a target declaration time limit that matches the generation time, the main table template corresponding to the target declaration time limit is queried; the compilation subject corresponding to the main table template is determined; the historical records corresponding to the compilation subject are queried, and the comparison information is extracted from the historical records; if the comparison information does not meet the comparison condition, the compilation document is generated based on the pre-set configuration data. Among them, the computer device 102 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0047] The embodiments of the present application can be applied to various business systems to improve the accuracy and efficiency of generating documents in the business systems to facilitate the declaration of corresponding business plans, wherein the business systems include but are not limited to financial systems, personnel systems, tax systems, enterprise management systems, ERP systems, production and manufacturing management systems, supply chain systems, etc.
[0048] In one embodiment, Figure 2 As shown, a document generation method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:
[0049] S202, in response to the document generation instruction, obtaining the generation time and reporting system of the document generation instruction.
[0050] Among them, the document generation instruction is an instruction for instructing a computer device to generate a compilation document, which can be an instruction triggered in the document generation interface; or it can also be an instruction automatically triggered when the preset compilation time arrives. The compilation document can be a document used to declare a specific business plan (hereinafter taking the capital plan as an example), which records the subject, declaration time limit, currency, purpose of funds, etc. The capital plan is the capital inflow or outflow plan of each business department or organization of the enterprise, which is used to collect and predict the capital inflow or outflow information within a preset time period. The compilation system is a label used to classify and manage capital plans. For example, system 1 includes capital plans A, B, and C, and system 2 includes capital plans E and F, etc. The capital plans in each compilation system are configured with corresponding compilation frequencies, compilation subjects, compilation templates, etc.
[0051] In one embodiment, the computer device generates a document generation instruction in response to a trigger operation on a trigger control in the document generation interface. For example, the computer device generates a document generation instruction in response to a trigger operation on a button in the document generation interface.
[0052] In another embodiment, the computer device pre-configures the reporting time of each funding plan, and automatically triggers the generation of a document generation instruction when the reporting time arrives. For example, the pre-configured reporting time is 2021-03-01, 2021-03-08, etc. When 2021-03-01 or 2021-03-08 arrives, the computer device automatically triggers the generation of a document generation instruction. In one embodiment, for the preparation of documents reported once a week, the pre-configured reporting time is the first day of each week; for the preparation of documents reported once a month, the pre-configured reporting time is the first day of each month. The computer device sets the reporting time in a weekly or monthly cycle, rather than setting a specific reporting date, so that the reporting date parameters can be reused and the complexity of parameter settings can be reduced.
[0053] S204: Among the reporting deadlines corresponding to the reporting system, if there is a target reporting deadline that matches the generation time, the main table template corresponding to the target reporting deadline is queried.
[0054] The reporting deadline is the deadline for reporting the funding plan, which can be a period member under the period dimension of the reporting system. For example, for a funding plan reported once a week, the reporting deadline can be the first day of each week; for a funding plan reported once a month, the reporting deadline can be the first three days of each month, etc. The main table template is the funding plan template, which is the form sample based on when compiling documents, and also includes sub-table templates associated with the main table template.
[0055] In one embodiment, the computer device is pre-configured for each reporting system, and for each funding plan in each reporting system, the reporting deadline and the corresponding funding plan template are pre-configured. The computer device queries the main table template corresponding to the target reporting deadline in the configured funding plan template. For example, the computer device pre-configures the main table template corresponding to the first phase (reporting deadline 2021-1-01) funding plan of reporting system A as template 01; the main table templates corresponding to the second phase (reporting deadline 2021-1-08) funding plan are templates 01 and template 02, and the main table templates corresponding to the third phase (reporting deadline 2021-1-14) funding plan are templates 01 and template 03. If the target reporting deadline is 2021-1-14, the main table templates queried by the computer device are templates 01 and template 03.
[0056] In one embodiment, in each reporting time limit corresponding to the reporting system, if the generation time is within the time period determined based on the reporting time limit, the computer device determines that there is a target reporting time limit that matches the generation time. Alternatively, if the generation time and the reporting time limit are on the same day, the computer device determines that there is a target reporting time limit that matches the generation time. Alternatively, if the generation time and the reporting time limit are in the same week, the computer device determines that there is a target reporting time limit that matches the generation time.
[0057] S206, determining the reporting entity corresponding to the main table template.
[0058] Among them, the reporting subject is the subject that reports the funding plan. For example, the reporting subject can be branch company A, or department A-03, or organization S, etc. The reporting subject corresponding to each master table template can be pre-configured by the computer device according to actual needs. When the reporting subject needs to compile a funding plan according to a master table template, the computer device sets the reporting subject as the reporting subject corresponding to the master table template. For example, the computer device can configure the reporting subject corresponding to the master table template to be A, B, and C.
[0059] S208, querying the historical records corresponding to the reporting entity, and extracting comparison information from the historical records.
[0060] Among them, historical records are records of the preparation documents submitted by the preparation subject in the past, including record identification, preparation subject, preparation cycle or the identification of the fund plan template based on which the preparation is based. The preparation cycle is the period for preparing the fund plan. For example, when the fund plan is prepared once a month, one month is a preparation cycle; when the fund plan is prepared once a week, one week is a preparation cycle. The template identification is the mark of the fund plan template, which is used to identify the fund plan template, including the main table template identification and the sub-table template identification. For example, Figure 3 As shown, the computer device queries 3 historical records of the reporting entity A in the 5th week of June 2021. In record 1, the compilation document submitted by the reporting entity is compiled based on the main table template 01, in record 2, the compilation document submitted by the reporting entity is compiled based on the sub-table template 001, and in record 3, the compilation document submitted by the reporting entity is compiled based on the sub-table template 002. Comparison information is information to determine whether the historically submitted compilation document is the same as the compilation document to be generated, which may include the compilation cycle, template identifier, or reporting entity, etc.
[0061] S210: If the comparison information does not meet the comparison condition, a compilation document is generated based on the preset configuration data.
[0062] Among them, the comparison condition is a condition used to determine whether to generate a compilation document. For example, the comparison condition can be that the comparison information is consistent with the pre-configured information. For example, the comparison condition can be that the compilation cycle, template identifier, and compilation subject in the comparison information are consistent with the compilation cycle, template identifier, and compilation subject corresponding to the compilation document to be generated. The configuration data is the basis for generating the compilation document of the capital plan, including the declaration time limit, conversion rate, conversion rate date, etc. of the capital plan.
[0063] In one embodiment, the computer device generates the prepared document based on the preset configuration data, template identifier, currency range, business unit, numbering rules for the prepared document, etc. Therefore, when the declaration time of the capital plan arrives, the computer device can automatically generate the prepared document according to the preset configuration items without human intervention, thereby improving the efficiency of generating the prepared document.
[0064] In one embodiment, if the comparison information meets the comparison conditions, in response to the document filling instruction, the historical document corresponding to the historical record is displayed. If the comparison information meets the comparison conditions, it means that the preparation document required to be submitted for the current application of the capital plan has been generated, and there is a historical record of the preparation subject submitting the preparation document, so there is no need to generate it again. When the computer device receives the document filling instruction, in response to the document filling instruction, the historical document corresponding to the historical record is displayed to fill in the historical document.
[0065] In the above embodiment, in response to the document generation instruction, the generation time and the compilation system of the document generation instruction are obtained; among the declaration time limits corresponding to the compilation system, if there is a target declaration time limit that matches the generation time, it means that the declaration time of the compilation document that needs to be filled in under the compilation system has arrived, so the computer device queries the main table template corresponding to the target declaration time limit, and determines the compilation subject corresponding to the main table template. The computer device queries the historical records corresponding to the compilation subject, so that it can be determined whether the compilation document to be generated already exists based on the historical records. The computer device extracts comparison information from the historical documents; if the comparison information does not meet the comparison conditions, it means that the compilation document to be generated has not been allocated, and the compilation document does not exist in the system, so the computer device generates the compilation document corresponding to the compilation subject based on the pre-set configuration data. The computer device generates the compilation document only when the comparison information does not meet the comparison conditions, which reduces the number of document generation, avoids repeated generation of existing compilation documents, and improves the efficiency of document generation.
[0066] In one embodiment, before S204, it also includes: responding to the document generation instruction, determining the reporting type; S204 specifically includes: determining the declaration period according to the generation time; among the declaration time limits corresponding to the reporting system, selecting all candidate declaration time limits under the reporting type; among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, querying the main table template corresponding to the target declaration time limit.
[0067] The reporting type is the type of the reported funding plan. For example, reporting system 1 may include reporting type A, reporting type B, and reporting type C. Multiple reporting time limits are configured for each reporting type, for example, Figure 4 As shown, the reporting type A under the reporting system 1 includes two candidate reporting deadlines: the first week of June and the second week of June. The reporting period is a time period determined according to the generation time, which can be any time period including the generation time, or a time period starting from the generation time. For example, when the generation time is June 25, the reporting period can be from June 25 to June 28, or from June 23 to June 27, etc.
[0068] In the above embodiment, the computer device determines the declaration period according to the generation time, and determines whether there is a target declaration period matching the declaration period among the candidate declaration period, and determines that there is a fund plan that needs to be declared when there is a target declaration period matching the declaration period. Therefore, it can automatically check whether there is a fund plan that needs to be declared according to the declaration period under each reporting type, which improves the efficiency of document generation compared to manual verification.
[0069] In one embodiment, the preparation document includes a first preparation document and a second preparation document; if the comparison information meets the comparison conditions, the preparation document corresponding to the preparation subject is generated based on the preset configuration data, including: if the comparison information meets the comparison conditions, based on the preset configuration data, the first preparation document corresponding to the preparation subject is generated according to the main table template; based on the configuration data, the second preparation document corresponding to the preparation subject is generated according to the sub-table template associated with the main table template.
[0070] The fund plan template includes a main table template and a sub-table template, the first compilation document is a compilation document generated according to the main table template, and the second compilation document is a compilation document generated according to the sub-table template. For example, the fund plan template includes a main table template 01, a sub-table template 001, a sub-table template 002, and a sub-table template 003. The computer device generates a first compilation document according to the main table template 01, and generates three second compilation documents according to the sub-table templates 001, 002, and 003, thereby generating a complete set of compilation documents for declaring a fund plan.
[0071] In the above embodiment, the computer device generates the first preparation document corresponding to the preparation subject according to the main table template, and generates the second preparation document corresponding to the preparation subject according to the sub-table template associated with the main table template. Therefore, the computer device only needs to complete the setting of the capital plan template in advance, and when the declaration time of the capital plan arrives, the first preparation document and the second preparation document that need to be filled in can be automatically generated according to the configured capital plan template, thereby improving the efficiency of document generation.
[0072] In one embodiment, before S210, it also includes: obtaining the total number of documents to be generated for all reporting entities; determining the number of threads based on the total number of documents to be generated, and creating threads according to the number of threads; S210 specifically includes: if the comparison information does not meet the comparison conditions, determining the target thread in the created thread; through the target thread, generating the compilation document corresponding to the reporting entity based on the pre-set configuration data.
[0073] Among them, the total number of documents to be generated is the total number of documents generated for all reporting entities. For example, 10 compilation documents need to be generated for reporting entity A, 20 compilation documents need to be generated for reporting entity B, and 15 compilation documents need to be generated for reporting entity C, then the total number of documents to be generated is 45. The computer device determines the number of threads based on the total number of documents to be generated. For example, the computer device can determine the number of threads according to the ratio of the total number of documents to be generated to the preset number. The preset number can be the number of documents that can be generated by each thread. The computer device can group the compilation documents to be generated according to the total number of documents to be generated, create a corresponding thread for each group of compilation documents to be generated, and generate the group of compilation documents through the created thread.
[0074] If the comparison information extracted from the historical records corresponding to the reporting subject does not meet the comparison condition, it means that a compilation document needs to be generated for the reporting subject. The computer device determines a target thread in the created thread, and then generates a compilation document corresponding to the reporting subject through the target thread based on the preset configuration data.
[0075] In the above embodiment, the total number of documents to be generated for all report compilation entities is obtained, the number of threads is determined based on the total number of documents to be generated, and threads are created according to the number of threads. Thus, the compiled documents to be generated can be grouped, and a corresponding thread is created for each group of compiled documents to complete the document issuance task, which speeds up the document generation and improves the document generation efficiency.
[0076] In one embodiment, before S208, it also includes: obtaining document issuance tasks for all reporting entities; grouping the document issuance tasks to obtain at least two document issuance task groups; and starting threads corresponding to each document issuance task group respectively; S208 specifically includes: querying the historical records corresponding to the reporting entity through the thread started by the document issuance task group corresponding to the reporting entity, and extracting comparison information from the historical records.
[0077] Among them, the document issuing task is a task established in the business system for issuing the prepared documents. When the computer device executes the document issuing task, it queries the historical records according to the reporting system, template, and reporting time limit, and compares the comparison information with the historical records to determine whether there are prepared documents to be reported in the historical records. For example, there are 50 reporting entities in the business system, and the 50 reporting entities have a total of 100 document issuing tasks to be executed. The computer device can group the document issuing tasks according to the reporting entity, reporting system, template in the reporting system, reporting time limit, etc. corresponding to each document issuing task, and start the corresponding thread for each document issuing task group. Then query and compare through the thread started for the document issuing task group. For example, the computer device divides 100 document issuing tasks into 10 groups according to the reporting system, and then starts 10 threads, and executes the document issuing tasks in the corresponding document issuing task group through each thread.
[0078] In the above embodiment, the computer device obtains the document issuing tasks for all the reporting entities; groups the document issuing tasks to obtain at least two document issuing task groups; respectively starts the threads corresponding to the document issuing task groups; queries the historical records corresponding to the reporting entities through the threads started for the document issuing task groups corresponding to the reporting entities, and extracts the comparison information from the historical records. Thus, the document issuing tasks can be executed in parallel through multiple threads, which improves the execution speed of the document issuing tasks and the efficiency of document generation.
[0079] In one embodiment, Figure 5 As shown, when receiving a document generation instruction triggered on the document generation interface, or receiving a document generation instruction automatically triggered when a pre-configured time arrives, the computer device responds to the document generation instruction and first performs execution verification. When executing the verification, the computer device checks the reporting subject, the reporting period and the template. The computer device obtains the generation time of the document generation instruction, the reporting system and the reporting type (assuming that it is reporting system 1 and reporting type S). The computer device determines the reporting period according to the generation time, and then determines whether there is a target reporting period that matches the reporting period among all the candidate reporting time limits corresponding to the reporting type under the reporting system. The computer device can create a thread for each candidate reporting time limit, and then determine whether the corresponding reporting time limit matches the reporting period through each thread. If the reporting time limit does not match the reporting period, the document generation process is terminated, and a prompt message "execution has been completed, and the latest funding plan under reporting type S has not yet reached the reporting time" is output. If there is a target reporting time limit that matches the reporting period, the next level of execution verification is performed (determining whether there is a published available master table template) to achieve the step-by-step execution of the verification task. The computer device determines whether there is a published available master table template under the target reporting time limit according to the configuration items managed by the plan template. For each target reporting time limit, the computer device can create a corresponding thread, and then determine whether there is a published available master table template under the corresponding target reporting time limit through each thread. If so, it is determined that there is a funding plan that reaches the reporting time under the reporting type of the reporting system, and the master table template corresponding to the target reporting time limit is queried; if not, the document generation process is terminated and the prompt message "Cannot find a published available master table template" is output. If it is found that there is a published available master table template under the target reporting time limit, the next level of execution verification (searching for the reporting subject) is continued. The computer device searches for the reporting subject corresponding to the master table template (if the reporting subject found is A, B, C). For each master table template, the computer device can create a corresponding thread, and then search for the reporting subject corresponding to the master table template through the thread. The computer equipment performs verification at each level. Once a condition is not met, the process of generating the document is terminated. The process is refined layer by layer starting from the period inspection items. That is, the threads of document generation are increased progressively from 1. When the verification in the last-level thread fails, it only affects its own thread, thus ensuring the efficiency of document generation.
[0080] After completing the execution verification, the computer device performs a duplicate verification. When performing the duplicate verification, the computer device compares the comparison information with the historical record based on the overwriting update method to avoid repeatedly generating the preparation documents already in the historical record. When performing the duplicate verification, the computer device queries whether there is a historical record of assigning the main table template to the preparation subject in the historical records corresponding to each preparation subject. If the historical record of assigning the main table template to the preparation subject is found, the sub-table template associated with the main table template is determined. The computer device extracts the comparison information from the historical record, and the extracted comparison information includes the preparation period, template identification and preparation subject, wherein the template name includes the main table template identification and the sub-table template identification. If the preparation period, template identification and preparation subject of the preparation document to be generated are the same as the historical record, it is determined that the preparation document to be generated already exists in the system and does not need to be generated again. If the preparation period, template identification and preparation subject of the preparation document to be generated are different from the historical record, the computer device performs the document generation verification. Document generation verification is based on existing document generation parameters, templates, coding rules and other configuration data. The system automatically extracts and combines parameters, templates and configuration data to generate a compilation document. The computer equipment generates a compilation document based on the pre-set configuration data, configuration items managed by the plan template, coding rules and business units, and outputs a prompt message "Completed, xx compilation documents were successfully generated this time"
[0081] In the above embodiment, by highly abstracting the rules and parameter definitions for generating documents, the user only needs to set parameters such as the declaration start time, the stop declaration time, and the exchange rate date. The computer device automatically executes the document issuance task according to the parameters set by the user, and reuses the parameters according to the parameters set by the user, thereby reducing the manual maintenance cost and improving the document generation efficiency. In addition, the computer device performs duplicate verification. If there are prepared documents to be issued in the historical records, the prepared documents in the historical records can be refreshed to the display interface without the need for repeated generation. Compared with the manual issuance method, the efficiency of document issuance is improved.
[0082] In one embodiment, Figure 6 As shown, the document generation method includes the following steps:
[0083] S602, in response to the document generation instruction, obtaining the generation time, reporting system and reporting type of the document generation instruction.
[0084] S604, determine the declaration period according to the generation time.
[0085] S606, among the reporting time limits corresponding to the reporting system, select all candidate reporting time limits under the reporting type.
[0086] S608: Among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, query the main table template corresponding to the target declaration time limit.
[0087] S610, among the reporting deadlines corresponding to the reporting system, if there is a target reporting deadline that matches the generation time, the main table template corresponding to the target reporting deadline is queried.
[0088] S612, determine the reporting entity corresponding to the main table template.
[0089] S614, query the historical records corresponding to the reporting entity, and extract comparison information from the historical records.
[0090] S616: If the comparison information meets the comparison conditions, a first compilation document corresponding to the compilation subject is generated according to the main table template based on the pre-set configuration data.
[0091] S618: Based on the configuration data, generate a second compilation document corresponding to the compilation subject according to the sub-table template associated with the main table template.
[0092] S620: If the comparison information meets the comparison condition, in response to the document filling instruction, display the historical document corresponding to the historical record.
[0093] For the specific contents of S602 to S620 above, reference may be made to the specific implementation process described above.
[0094] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0095] Based on the same inventive concept, the embodiment of the present application also provides a document generation device for implementing the document generation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more document generation device embodiments provided below can refer to the limitations on the document generation method above, and will not be repeated here.
[0096] In one embodiment, Figure 7As shown, a document generation device is provided, including: an acquisition module 702, a query module 704, a determination module 706, an extraction module 708 and a generation module 710, wherein:
[0097] An acquisition module 702, for acquiring the generation time and the reporting system of the document generation instruction in response to the document generation instruction;
[0098] A query module 704 is used to query the main table template corresponding to the target reporting time limit if there is a target reporting time limit matching the generation time in each reporting time limit corresponding to the reporting system;
[0099] Determination module 706, used to determine the reporting subject corresponding to the main table template;
[0100] Extraction module 708, used to query the historical records corresponding to the reporting subject and extract comparison information from the historical records;
[0101] The generating module 710 is used to generate a compilation document corresponding to the compilation subject based on the preset configuration data if the comparison information does not meet the comparison condition.
[0102] In the above embodiment, in response to the document generation instruction, the generation time and the compilation system of the document generation instruction are obtained; among the declaration time limits corresponding to the compilation system, if there is a target declaration time limit that matches the generation time, it means that the declaration time of the compilation document that needs to be filled in under the compilation system has arrived, so the computer device queries the main table template corresponding to the target declaration time limit, and determines the compilation subject corresponding to the main table template. The computer device queries the historical records corresponding to the compilation subject, so that it can be determined whether the compilation document to be generated already exists based on the historical records. The computer device extracts comparison information from the historical documents; if the comparison information does not meet the comparison conditions, it means that the compilation document to be generated has not been allocated, and the compilation document does not exist in the system, so the computer device generates the compilation document corresponding to the compilation subject based on the pre-set configuration data. The computer device generates the compilation document only when the comparison information does not meet the comparison conditions, which reduces the number of documents generated, avoids the repeated generation of existing compilation documents, and improves the efficiency of document generation.
[0103] In one embodiment, the apparatus further comprises:
[0104] A determination module 706, for determining a report type in response to a document generation instruction;
[0105] The query module 704 is further used for:
[0106] Determine the reporting period based on the generation time;
[0107] Among the reporting time limits corresponding to the reporting system, select all candidate reporting time limits under the reporting type;
[0108] Among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, the main table template corresponding to the target declaration time limit will be queried.
[0109] In one embodiment, the prepared document includes a first prepared document and a second prepared document; the generating module 710 is further used to:
[0110] If the comparison information meets the comparison conditions, based on the preset configuration data, the first compilation document corresponding to the compilation subject is generated according to the main table template;
[0111] Based on the configuration data, a second compilation document corresponding to the compilation subject is generated according to the sub-table template associated with the main table template.
[0112] In one embodiment, the apparatus further comprises:
[0113] The acquisition module 712 is also used to acquire the total number of documents to be generated for all reporting entities;
[0114] A creation module 714, used to determine the number of threads based on the total number of documents to be generated, and create threads according to the number of threads;
[0115] The generating module 710 is further used for:
[0116] If the comparison information does not meet the comparison condition, determine the target thread in the created thread;
[0117] Through the target thread, the preparation document corresponding to the preparation subject is generated based on the preset configuration data.
[0118] In one embodiment, the apparatus further comprises:
[0119] The acquisition module 712 is used to acquire the document issuing tasks for all the reporting entities;
[0120] A grouping module 716, used to group the document issuing tasks to obtain at least two document issuing task groups;
[0121] The start module 718 is used to start the threads corresponding to each document issuing task group respectively;
[0122] The extraction module 708 is also used to query the historical records corresponding to the reporting entity through the thread started by the document issuing task group corresponding to the reporting entity, and extract comparison information from the historical records.
[0123] In one embodiment, Figure 8 As shown, the device also includes:
[0124] The display module 720 is used to display the historical document corresponding to the historical record in response to the document filling instruction if the comparison information meets the comparison condition.
[0125] In one embodiment, the document generation instruction is an instruction triggered on the document generation interface; or, the document generation instruction is an instruction automatically triggered when a preset reporting time arrives.
[0126] Each module in the above-mentioned document generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0127] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store document generation data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a document generation method is implemented.
[0128] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a document generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0129] Those skilled in the art will understand that Fig. 9 , 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0130] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: in response to a document generation instruction, obtaining the generation time and the reporting system of the document generation instruction; among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, querying the main table template corresponding to the target reporting time limit; determining the reporting subject corresponding to the main table template; querying the historical records corresponding to the reporting subject, and extracting comparison information from the historical records; if the comparison information does not meet the comparison conditions, generating a compilation document corresponding to the reporting subject based on pre-set configuration data.
[0131] In one embodiment, the processor also implements the following steps when executing the computer program: determining the reporting type in response to the document generation instruction; determining the declaration period according to the generation time; selecting all candidate declaration time limits under the reporting type from each declaration time limit corresponding to the reporting system; among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, querying the main table template corresponding to the target declaration time limit.
[0132] In one embodiment, the preparation document includes a first preparation document and a second preparation document; when the processor executes the computer program, the following steps are also implemented: if the comparison information meets the comparison conditions, based on the pre-set configuration data, a first preparation document corresponding to the preparation subject is generated according to the main table template; based on the configuration data, a second preparation document corresponding to the preparation subject is generated according to the sub-table template associated with the main table template.
[0133] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the total number of documents to be generated for all reporting entities; determining the number of threads based on the total number of documents to be generated, and creating threads according to the number of threads; if the comparison information does not meet the comparison conditions, determining the target thread in the created thread; through the target thread, generating the compilation document corresponding to the reporting entity based on the pre-set configuration data.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining document issuance tasks for all reporting entities; grouping the document issuance tasks to obtain at least two document issuance task groups; respectively starting threads corresponding to each document issuance task group; querying the historical records corresponding to the reporting entity through the threads started by the document issuance task group corresponding to the reporting entity, and extracting comparison information from the historical records.
[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the document generation instruction is an instruction triggered on the document generation interface; or, the document generation instruction is an instruction automatically triggered when the preset reporting time arrives.
[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if the comparison information meets the comparison conditions, in response to the document filling instruction, the historical document corresponding to the historical record is displayed.
[0137] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: in response to a document generation instruction, the generation time and the reporting system of the document generation instruction are obtained; among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, the main table template corresponding to the target reporting time limit is queried; the reporting subject corresponding to the main table template is determined; the historical records corresponding to the reporting subject are queried, and comparison information is extracted from the historical records; if the comparison information does not meet the comparison conditions, a compilation document corresponding to the reporting subject is generated based on pre-set configuration data.
[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the document generation instruction, determining the reporting type; determining the declaration period according to the generation time; from each declaration time limit corresponding to the reporting system, selecting all candidate declaration time limits under the reporting type; among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, querying the main table template corresponding to the target declaration time limit.
[0139] In one embodiment, the preparation document includes a first preparation document and a second preparation document; when the computer program is executed by the processor, the following steps are also implemented: if the comparison information meets the comparison conditions, based on the pre-set configuration data, a first preparation document corresponding to the preparation subject is generated according to the main table template; based on the configuration data, a second preparation document corresponding to the preparation subject is generated according to the sub-table template associated with the main table template.
[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the total number of documents to be generated for all reporting entities; determining the number of threads based on the total number of documents to be generated, and creating threads according to the number of threads; if the comparison information does not meet the comparison conditions, determining the target thread in the created thread; through the target thread, generating the compilation document corresponding to the reporting entity based on the pre-set configuration data.
[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining document issuance tasks for all reporting entities; grouping the document issuance tasks to obtain at least two document issuance task groups; respectively starting threads corresponding to each document issuance task group; querying the historical records corresponding to the reporting entity through the threads started by the document issuance task group corresponding to the reporting entity, and extracting comparison information from the historical records.
[0142] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the document generation instruction is an instruction triggered on the document generation interface; or, the document generation instruction is an instruction automatically triggered when the preset reporting time arrives.
[0143] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the comparison information meets the comparison conditions, in response to the document filling instruction, the historical document corresponding to the historical record is displayed.
[0144] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: in response to a document generation instruction, obtaining the generation time and the reporting system of the document generation instruction; among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, querying the main table template corresponding to the target reporting time limit; determining the reporting subject corresponding to the main table template; querying the historical records corresponding to the reporting subject, and extracting comparison information from the historical records; if the comparison information does not meet the comparison conditions, generating a compilation document corresponding to the reporting subject based on pre-set configuration data.
[0145] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: in response to the document generation instruction, determining the reporting type; determining the declaration period according to the generation time; from each declaration time limit corresponding to the reporting system, selecting all candidate declaration time limits under the reporting type; among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, querying the main table template corresponding to the target declaration time limit.
[0146] In one embodiment, the preparation document includes a first preparation document and a second preparation document; when the computer program is executed by the processor, the following steps are also implemented: if the comparison information meets the comparison conditions, based on the pre-set configuration data, a first preparation document corresponding to the preparation subject is generated according to the main table template; based on the configuration data, a second preparation document corresponding to the preparation subject is generated according to the sub-table template associated with the main table template.
[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the total number of documents to be generated for all reporting entities; determining the number of threads based on the total number of documents to be generated, and creating threads according to the number of threads; if the comparison information does not meet the comparison conditions, determining the target thread in the created thread; through the target thread, generating the compilation document corresponding to the reporting entity based on the pre-set configuration data.
[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining document issuance tasks for all reporting entities; grouping the document issuance tasks to obtain at least two document issuance task groups; respectively starting threads corresponding to each document issuance task group; querying the historical records corresponding to the reporting entity through the threads started by the document issuance task group corresponding to the reporting entity, and extracting comparison information from the historical records.
[0149] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the document generation instruction is an instruction triggered on the document generation interface; or, the document generation instruction is an instruction automatically triggered when the preset reporting time arrives.
[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the comparison information meets the comparison conditions, in response to the document filling instruction, the historical document corresponding to the historical record is displayed.
[0151] The embodiments of the present application have at least the following technical effects:
[0152] 1) Parameterize task requirements to reduce manual maintenance costs;
[0153] 2) The hierarchical inspection mechanism improves system performance while also ensuring the accuracy of plan document generation;
[0154] 3) One-click efficient issuance improves the efficiency of generating documents for fund planning, thereby improving the real-time and mobility of the issuance process and effectively improving management efficiency;
[0155] 4) Based on the highly automated distribution process, the distribution behavior can be executed by scheduled tasks, which directly reduces labor costs and maintenance costs.
[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A document generation method, characterized in that: The method comprises: In response to a document generation instruction, obtaining a generation time and a reporting system of the document generation instruction; Among the reporting time limits corresponding to the reporting system, if there is a target reporting time limit that matches the generation time, query the main table template corresponding to the target reporting time limit; Determine the reporting entity corresponding to the main table template; Query the historical records corresponding to the reporting entity, and extract comparison information from the historical records; If the comparison information does not meet the comparison condition, a compilation document corresponding to the compilation subject is generated based on the preset configuration data; The method further comprises: determining a report type in response to the document generation instruction; If, among the reporting deadlines corresponding to the reporting system, there is a target reporting deadline that matches the generation time, querying the main table template corresponding to the target reporting deadline includes: Determine the declaration period according to the generation time; select all candidate declaration time limits under the declaration type from among the declaration time limits corresponding to the declaration system; among the candidate declaration time limits, if there is a target declaration time limit that matches the declaration period, query the master table template corresponding to the target declaration time limit; The preparation document includes a first preparation document and a second preparation document; if the comparison information does not meet the comparison condition, generating the preparation document corresponding to the preparation subject based on the preset configuration data includes: If the comparison information does not meet the comparison conditions, based on the pre-set configuration data, the first compilation document corresponding to the compilation subject is generated according to the main table template; based on the configuration data, the second compilation document corresponding to the compilation subject is generated according to the sub-table template associated with the main table template.
2. The method according to claim 1, characterized in that The method further comprises: Obtain the total number of documents to be generated for all the reporting entities; Determine the number of threads based on the total number of documents to be generated, and create threads according to the number of threads; If the comparison information does not meet the comparison condition, generating a compilation document corresponding to the compilation subject based on the preset configuration data includes: If the comparison information does not satisfy the comparison condition, determining a target thread in the created threads; Through the target thread, a compilation document corresponding to the compilation subject is generated based on the preset configuration data.
3. The method according to claim 1, characterized in that The method further comprises: Obtain document issuance tasks for all the reporting entities; Grouping the document issuing tasks to obtain at least two document issuing task groups; Start the threads corresponding to the document issuing task groups respectively; The querying of the historical records corresponding to the reporting entity and extracting the comparison information from the historical records includes: Through the thread started by the document issuing task group corresponding to the reporting entity, the historical records corresponding to the reporting entity are queried, and the comparison information is extracted from the historical records.
4. The method according to any one of claims 1 to 3, characterized in that: The document generation instruction is an instruction triggered on a document generation interface; or, the document generation instruction is an instruction automatically triggered when a preset reporting time arrives.
5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the comparison information satisfies the comparison condition, in response to the document filling instruction, the historical document corresponding to the historical record is displayed.
6. A document generating device, characterized in that: The device comprises: An acquisition module, for acquiring, in response to a document generation instruction, a generation time and a reporting system of the document generation instruction; A query module, used for querying the main table template corresponding to the target reporting time limit if there is a target reporting time limit matching the generation time in each reporting time limit corresponding to the reporting system; A determination module, used to determine the reporting subject corresponding to the main table template; An extraction module, used to query the historical records corresponding to the reporting subject and extract comparison information from the historical records; A generating module, configured to generate a compilation document corresponding to the compilation subject based on preset configuration data if the comparison information does not meet the comparison condition; The determination module is further used to determine the report type in response to the document generation instruction; The query module is further used to determine the reporting period according to the generation time; select all candidate reporting time limits under the reporting type from among the reporting time limits corresponding to the reporting system; and query the master table template corresponding to the target reporting time limit if there is a target reporting time limit matching the reporting period among the candidate reporting time limits; Wherein, the prepared documents include a first prepared document and a second prepared document; The generation module is also used to generate a first preparation document corresponding to the compilation subject according to the main table template based on the pre-set configuration data if the comparison information does not meet the comparison conditions; based on the configuration data, generate a second preparation document corresponding to the compilation subject according to the sub-table template associated with the main table template.
7. The device according to claim 6, characterized in that The device also includes: The acquisition module is further used to acquire the total number of documents to be generated for all the reporting entities; A creation module, used to determine the number of threads based on the total number of documents to be generated, and create threads according to the number of threads; The generating module is further used to determine a target thread in the created thread if the comparison information does not meet the comparison condition; and generate a compilation document corresponding to the compilation subject based on the preset configuration data through the target thread.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Data processing method and device, server and computer readable storage medium
CN110222021A
Information processing method and related equipment
CN110457332A