Layout file packaging method, device, equipment, storage medium and product
By generating data query requests according to a preset query splitting strategy and performing concurrent encapsulation operations in the accounting electronic archive system, the problem of low encapsulation efficiency in the accounting electronic archive system is solved, and efficient file encapsulation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PEOPLE'S INSURANCE COMPANY OF CHINA
- Filing Date
- 2023-04-28
- Publication Date
- 2026-06-23
Smart Images

Figure CN116521722B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a method, apparatus, device, storage medium and product for packaging formatted documents. Background Technology
[0002] A layout document format is an electronic document format with a fixed page layout. The presentation of a layout document is device-independent; the layout remains consistent regardless of the device on which it is read, printed, or distributed. Layout documents are primarily used for the publication, dissemination, and archiving of completed documents.
[0003] Typically, electronic accounting archive systems extract structured data from the financial system, including vouchers, general ledgers, and subsidiary ledgers. Based on this structured data, the electronic accounting archive system then uniformly packages the data into PDF format. However, the file packaging process in electronic accounting archive systems is inefficient. Summary of the Invention
[0004] This application provides a method, apparatus, device, storage medium, and product for packaging formatted documents, in order to solve the problem of low execution efficiency in the packaging of documents in accounting electronic archive systems.
[0005] Firstly, this application provides a method for encapsulating layout files, including:
[0006] Data query requests are generated according to a preset query splitting strategy and sent to the financial system server;
[0007] In response to the successful execution information of the data query request, it is determined that the target financial data retrieved according to the data query request has been synchronized to the archive system database;
[0008] The number of packaging servers to be activated is determined based on the total number of target packaged files corresponding to the target financial data.
[0009] The target financial data is sent to a message queue so that at least one encapsulation server is enabled to retrieve the target financial data from the message queue, encapsulate the target financial data to obtain a target encapsulation file, and store the encapsulated target encapsulation file.
[0010] Optionally, generating a data query request according to a preset query splitting strategy includes:
[0011] The accounting unit, year, accounting period, and accounting subject of the financial data to be encapsulated are split according to the corresponding preset query splitting strategy to generate at least one multi-dimensional query condition; the financial data to be encapsulated includes the target financial data queried according to at least one multi-dimensional query condition; at least one corresponding data query request is generated according to the at least one multi-dimensional query condition.
[0012] Optionally, after determining that the target financial data retrieved according to the data query request has been synchronized to the archive system database in response to the successful execution information of the data query request, the method further includes:
[0013] Determine whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request; if they are inconsistent, identify the inconsistent data items in the target financial data and send the inconsistent data items to the user terminal.
[0014] Optionally, determining whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request includes:
[0015] Calculate the query data statistics information corresponding to the target financial data according to the statistical algorithm corresponding to the type of target financial data; send a data statistics request to the financial system server; the data statistics request includes the corresponding statistical algorithm; receive the source data statistics information calculated by the statistical algorithm corresponding to the data type of target financial data sent by the data statistics request; if it is determined that the query data statistics information is the same as the corresponding source data statistics information, then it is determined that the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request.
[0016] Optionally, the step of calculating the query data statistics information corresponding to the target financial data using the statistical algorithm corresponding to the type of target financial data includes:
[0017] If the type of target financial data is determined to include accounting vouchers, the number of query data vouchers corresponding to the target financial data of the accounting voucher type is calculated according to the preset accounting unit, year, and accounting period splitting strategy; the query data statistics information includes the number of query data vouchers. If the type of target financial data is determined to include subsidiary ledgers, the query data statistics amount corresponding to the target financial data of the subsidiary ledger type is calculated according to the preset accounting unit, year, accounting period, and accounting subject splitting strategy; the query data statistics information includes the query data statistics amount.
[0018] Optionally, determining inconsistent data items in the target financial data includes:
[0019] The target financial data is divided into multiple groups based on the timestamps corresponding to the target financial data; the query data statistics corresponding to each group of financial data are calculated and the source data statistics corresponding to each group of financial data are obtained; if it is determined that the query data statistics corresponding to a certain group of financial data are the same as the corresponding source data statistics, then the inconsistent data items are identified in that group of financial data.
[0020] Optionally, sending the target financial data to the message queue further includes:
[0021] Store the total task number corresponding to the target financial data in the total task status table, and determine the task status corresponding to the total task in the total task status table as incomplete.
[0022] Determine the encapsulation task data corresponding to each encapsulation task in the target financial data, send the encapsulation task data corresponding to each encapsulation task to the message queue, so that at least one encapsulation server can obtain the encapsulation task data corresponding to the next encapsulation task from the message queue after completing the previous encapsulation task, encapsulate the encapsulation task data to obtain the encapsulation file corresponding to the encapsulation task, and store the encapsulated encapsulation file corresponding to the encapsulation task.
[0023] The packaging task data corresponding to each packaging task is stored in the target financial data location and the packaging task number in the packaging task status table, and the task status corresponding to each packaging task in the packaging task status table is determined as incomplete.
[0024] Optionally, after sending the target financial data to the message queue, the method further includes:
[0025] In response to the packaging task completion information returned by the packaging server, the task status of the corresponding packaging task in the packaging task status table is determined to be completed; if it is determined that the task status of each packaging task in the packaging task status table corresponding to the total task is completed, then the task status of the total task in the total task status table is determined to be completed.
[0026] Optionally, after sending the target financial data to the message queue, the method further includes:
[0027] In response to the packaging task failure information returned by the packaging server, the task status of the corresponding packaging task in the packaging task status table is determined to be execution failure; the packaging task data corresponding to the failed packaging task in the packaging task status table is sent to the user terminal at the location of the target financial data so that the user can process the packaging task data that failed to be packaged.
[0028] Secondly, this application provides a formatted document packaging device, comprising:
[0029] The sending module is used to generate data query requests according to a preset query splitting strategy and send the data query requests to the financial system server.
[0030] The data confirmation module is used to confirm, in response to the successful execution information of the data query request, that the target financial data retrieved according to the data query request has been synchronized to the archive system database.
[0031] The quantity determination module is used to determine the number of packaging servers to be activated based on the total number of target packaging files corresponding to the target financial data;
[0032] An execution module is used to send the target financial data to a message queue, so that at least one enabled encapsulation server can obtain the target financial data from the message queue, perform encapsulation operations on the target financial data to obtain a target encapsulation file, and store the encapsulated target encapsulation file.
[0033] Thirdly, this application provides a file system server, including: a processor, and a memory and a transceiver communicatively connected to the processor;
[0034] The memory stores computer-executed instructions; the transceiver is used for sending and receiving data.
[0035] The processor executes computer execution instructions stored in the memory to implement the format file encapsulation method described in any of the above aspects.
[0036] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the format file encapsulation method described in any of the above aspects.
[0037] Fifthly, this application provides a computer program product, including computer execution instructions that, when executed by a processor, implement the format file encapsulation method described in any of the preceding aspects.
[0038] The document encapsulation method, apparatus, device, storage medium, and product provided in this application generate a data query request according to a preset query splitting strategy and send the data query request to a financial system server; in response to the successful execution information of the data query request, it is determined that the target financial data queried according to the data query request has been synchronized to the archive system database; the number of encapsulation servers to be activated is determined based on the total number of target encapsulated files corresponding to the target financial data; the target financial data is sent to a message queue, so that at least one activated encapsulation server obtains the target financial data from the message queue and performs encapsulation operations on the target financial data to obtain the target encapsulated file, and stores the encapsulated target encapsulated file. The method first splits the data to be encapsulated to generate a data query request for the split data to be encapsulated, reducing the amount of target financial data queried and encapsulated in a single transaction; after obtaining the target financial data, the method splits the target financial data, enabling multiple encapsulation service servers to concurrently execute encapsulation operations on the target financial data, thereby improving encapsulation efficiency. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0040] Figure 1 A flowchart illustrating the format file encapsulation method provided in this application embodiment;
[0041] Figure 2 This is a schematic diagram of the network architecture provided in the embodiments of this application;
[0042] Figure 3 A flowchart illustrating the method for checking whether the acquired target financial data is consistent, provided in this application embodiment;
[0043] Figure 4 A flowchart illustrating the method for determining inconsistent data items in target financial data, as provided in this application embodiment;
[0044] Figure 5 This is a schematic diagram of the structure of the document packaging device provided in the embodiments of this application;
[0045] Figure 6 This is a schematic diagram of the structure of the file system server provided in an embodiment of this application.
[0046] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0048] The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. In the following descriptions of embodiments, "a plurality of" means two or more, unless otherwise explicitly defined.
[0049] First, the prior art involved in this invention will be described and analyzed in detail.
[0050] Current technology uses template filling for document formatting, with a single thread completing approximately one page per second. Considering that enterprises need to generate approximately 400 million pages of formatted documents annually, even with a single machine formatting one page per second and operating 24 / 7, only about one-tenth of the annual business requirements can be met, which cannot satisfy the timeliness requirements for enterprise accounting electronic file formatting.
[0051] The inventors discovered in their research that by first splitting the data to be packaged into a data query request to query the split data to be packaged, the amount of target financial data to be queried and packaged in a single transaction can be reduced. After obtaining the target financial data, it can be split into multiple packaging service servers to concurrently execute the packaging operation on the target financial data, thereby improving packaging efficiency. Therefore, this application provides a formatted file packaging method, which generates a data query request according to a preset query splitting strategy and sends the data query request to the financial system server; in response to the successful execution information of the data query request, it is determined that the target financial data queried according to the data query request has been synchronized to the archive system database; the number of packaging servers to be activated is determined based on the total number of target packaged files corresponding to the target financial data; the target financial data is sent to a message queue, so that at least one activated packaging server obtains the target financial data from the message queue, performs packaging operation on the target financial data to obtain the target packaged file, and stores the packaged target packaged file.
[0052] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0053] It should be noted that the format file packaging method, apparatus, device, and storage medium of this application can be used in the financial technology field, as well as in any field other than the financial technology field. The application fields of the format file packaging method, apparatus, device, storage medium, and product of this application are not limited.
[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0055] Figure 1This is a flowchart illustrating a formatted document packaging method provided in this application embodiment. This application embodiment addresses the problem of low execution efficiency in document packaging within an accounting electronic archive system by providing a formatted document packaging method. The method in this embodiment is applied to a formatted document packaging device, which can be located in an archive system server. The archive system server can be a digital computer of various forms, such as a laptop computer, desktop computer, workbench, personal digital assistant, server, blade server, mainframe computer, and other suitable computers.
[0056] like Figure 1 As shown, the specific steps of this method are as follows:
[0057] Step S101: Generate a data query request according to the preset query splitting strategy, and send the data query request to the financial system server.
[0058] The preset query splitting strategy involves splitting the query conditions of the data to be encapsulated into at least one query condition, thereby splitting the data to be encapsulated based on the query conditions. The data to be encapsulated refers to the data to be encapsulated into an encapsulation file. A data query request is a request to the financial system server to query target financial data according to the query conditions and to synchronize the target financial data retrieved according to the data query request to the archive system database.
[0059] In this embodiment of the application, the amount of data to be packaged into a package file may be large. Generating a data query request according to a preset query splitting strategy can reduce the amount of data in a single request and avoid the impact of excessive data extraction on the operation of the financial system.
[0060] For example, if the data to be packaged is 12 months of financial data, 12 data query requests can be generated according to the preset query splitting strategy. The 12 data query requests are used to request the query of financial data for each month in the 12 months.
[0061] Step S102: In response to the successful execution information of the data query request, determine that the target financial data retrieved according to the data query request has been synchronized to the archive system database.
[0062] The data query request controls the financial system server to query target financial data in the financial system database and synchronize the target financial data to the archives system database. After synchronizing the target financial data to the archives system database, the archives system server receives a success message indicating that the data query request has been successfully executed. This success message represents the information obtained by the archives system server after it has queried the target financial data according to the data query request and synchronized it to the archives system database. The target financial data is the financial data obtained based on the data query request.
[0063] In this embodiment, the archive system database and the financial system database can be homogeneous databases, and the data transmission efficiency can be improved by using DBLINK direct writing.
[0064] Figure 2 This is a schematic diagram of the network architecture provided in the embodiments of this application, such as... Figure 2 As shown, the system includes: a financial system server 1, a financial system database 10, an archive system server 2, an archive system database 20, and a packaging server 3. After receiving a data query request from the archive system server 2, the financial system server 1 queries the financial system database 10 according to the request and stores the query results in a temporary table. After completing the query according to the request, the target financial data in the temporary table is pushed to the archive system database 20 to store the target financial data in the archive system database. After confirming that the target financial data is stored in the archive system database, the archive system server 2 controls the packaging server 3 to obtain the target financial data and perform packaging operations on it.
[0065] Step S103: Determine the number of encapsulation servers to be activated based on the total number of target encapsulation files corresponding to the target financial data.
[0066] The total number of target encapsulated files refers to the total number of target encapsulated files that can be obtained after encapsulating the target financial data.
[0067] Specifically, after confirming that the target financial data retrieved according to the data query request has been synchronized to the archive system database, the total number of target encapsulation files corresponding to the target financial data can be determined, and the number of encapsulation servers to be activated can be determined based on the total number of target encapsulation files. The activated encapsulation servers are those used to encapsulate the target financial data into target encapsulation files.
[0068] Alternatively, the number of enabled packaging servers can be calculated using the formula: p = log2(T), where T is the total number of target packaged files and p is the number of packaging servers.
[0069] Step S104: Send the target financial data to the message queue so that at least one encapsulation server is enabled to obtain the target financial data from the message queue, encapsulate the target financial data to obtain the target encapsulation file, and store the encapsulated target encapsulation file.
[0070] The target encapsulation file is the layout file obtained after encapsulating the target financial data.
[0071] In this embodiment of the application, after determining the number of encapsulation servers to be enabled, the target financial data can be sent to a message queue, and the number of encapsulation servers can be controlled to obtain the target encapsulation file from the message queue and concurrently perform the encapsulation operation on the target encapsulation file to generate and store the encapsulated target encapsulation file.
[0072] For example, the archive system server may have an allocation program installed, which retrieves target financial data from the database and sends it to a message queue. An enabled encapsulation server retrieves and organizes the data from the message queue and calls the encapsulation service to generate the target encapsulation file.
[0073] Currently, accounting electronic record systems use PDF format as the file encapsulation format for electronic records, which consumes a large amount of storage space and network bandwidth. Alternatively, the target encapsulation file can be in OFD (Open Documentation) format. Compared to PDF, OFD reduces the storage space of the target encapsulation file, lowers the bandwidth requirements, and increases the speed of accessing the target encapsulation file.
[0074] Optionally, when at least one encapsulation server is enabled to encapsulate the target financial data, it can reduce data file write operations to disk by directly copying the data, thereby improving read / write conversion efficiency. Furthermore, since reading structured data and storing the encapsulated file primarily consumes database and storage I / O resources, and the file format conversion during the process is a CPU-intensive operation, a 1:1 CPU and memory configuration for the formatted file encapsulation application server can achieve the highest overall efficiency.
[0075] In the existing technology, when storing the packaged target file, the storage path of the target package file is also stored; when querying the target package file, the storage path of the target package file needs to be queried in advance so that the target package file can be found based on the storage path of the target package file.
[0076] Optionally, when storing the packaged target file, it can be stored according to a preset rule path. The preset rule path can be a path constructed using the corresponding accounting unit, year, accounting period, and accounting subject. When searching for the target packaged file, the preset rule path can be constructed using the corresponding accounting unit, year, accounting period, and accounting subject to retrieve the target packaged file, facilitating the storage and retrieval of the target packaged file.
[0077] The format file encapsulation method provided in this application generates a data query request according to a preset query splitting strategy and sends the data query request to the financial system server; in response to the successful execution information of the data query request, it is determined that the target financial data queried according to the data query request has been synchronized to the archive system database; the number of encapsulation servers to be activated is determined based on the total number of target encapsulation files corresponding to the target financial data; the target financial data is sent to a message queue so that at least one activated encapsulation server obtains the target financial data from the message queue and performs encapsulation operations on the target financial data to obtain the target encapsulation file, and stores the encapsulated target encapsulation file. The method first splits the data to be encapsulated to generate a data query request for the split data to be encapsulated, reducing the amount of target financial data to be queried and encapsulated in a single transaction; after obtaining the target financial data, the target financial data is split so that multiple encapsulation service servers can concurrently execute encapsulation operations on the target financial data, thereby improving encapsulation efficiency.
[0078] Optionally, one implementation of generating a data query request according to a preset query splitting strategy in step S101 may include:
[0079] Step S1011: Split the accounting unit, year, accounting period, and accounting subject of the financial data to be encapsulated according to the corresponding preset query splitting strategy to generate at least one multi-dimensional query condition.
[0080] The financial data to be packaged includes target financial data retrieved based on at least one multi-dimensional query condition.
[0081] Step S1012: Generate at least one corresponding data query request based on at least one multi-dimensional query condition.
[0082] In this embodiment of the application, the accounting unit, year, accounting period, and accounting subject of the financial data to be encapsulated can be separated, and the separated accounting unit, year, accounting period, and accounting subject can be combined to form four dimensions of query conditions, and the generated four dimensions of query conditions are determined as the query conditions in the data query request.
[0083] For example, the accounting units of the financial data to be packaged can be split into Unit A and Unit B, and the year can be split into 2020 and 2021. The accounting period and accounting subject cannot be split, and are accounting period A and accounting subject A. Then the generated query conditions can include: Unit A, 2020, accounting period A, accounting subject A; Unit A, 2021, accounting period A, accounting subject A; Unit B, 2020, accounting period A, accounting subject A; Unit B, 2021, accounting period A, accounting subject.
[0084] In this embodiment, the accounting unit, year, accounting period, and accounting subject of the financial data to be packaged are split according to the corresponding preset query splitting strategy to generate at least one multi-dimensional query condition. At least one data query request is generated according to the at least one multi-dimensional query condition. The amount of data to be packaged into a package file may be large. Generating multi-dimensional data query requests according to the preset query splitting strategy can split the financial data to be packaged into multiple dimensions, thereby reducing the amount of data in a single request and avoiding the impact of excessive data extraction in a single transaction on the operation of the financial system.
[0085] Based on the above embodiments, after responding to the successful execution information of the data query request in step S102 and determining that the target financial data queried according to the data query request has been synchronized to the archive system database, it is also possible to check whether the obtained data is correct. After the data is verified to be correct, the packaging server is controlled to package the target financial data, which may specifically include the following steps:
[0086] Step S201: Determine whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request.
[0087] Figure 3 The flowchart provided in this application embodiment illustrates a method for checking whether the acquired target financial data is consistent. Optionally, as shown... Figure 3 As shown, step S201, determining whether the received target financial data matches the target financial data retrieved by the financial system server according to the data query request, may include the following methods:
[0088] Step S2011: Calculate the query data statistics information corresponding to the target financial data according to the statistical algorithm corresponding to the type of target financial data.
[0089] In one optional implementation, the method by which step S2011 calculates the statistical information corresponding to the financial data using a statistical algorithm may include:
[0090] If the target financial data type is determined to include accounting vouchers, the number of query data vouchers corresponding to the target financial data type is calculated based on the preset accounting unit, year, and accounting period splitting strategy; the query data statistics include the number of query data vouchers.
[0091] If the target financial data type is determined to include subsidiary ledgers, the corresponding query data statistical amount is calculated based on the preset accounting unit, year, accounting period, and accounting subject splitting strategy; the query data statistical information includes the query data statistical amount.
[0092] For example, the type of target financial data includes accounting vouchers. The target financial data can be split according to a preset splitting strategy of accounting unit, year, and accounting period. The number of query data vouchers corresponding to the split target financial data is calculated separately. The combination of the number of query data vouchers corresponding to the split target financial data is determined as the query data statistics information corresponding to the target financial data.
[0093] In this embodiment of the application, the statistical information corresponding to the accounting voucher is determined as the number of vouchers, and the statistical information corresponding to the subsidiary ledger is determined as the statistical amount. This can make the statistical information accurately reflect the target financial data characteristics of the accounting voucher and subsidiary ledger, and improve the accuracy of determining whether the received target financial data based on the statistical information is consistent with the target financial data queried by the financial system server according to the data query request.
[0094] Step S2012: Send a data statistics request to the financial system server; the data statistics request includes the corresponding statistical algorithm.
[0095] Step S2013: Receive the source data statistics information sent by the data statistics request, calculated by the statistical algorithm corresponding to the data type of the target financial data.
[0096] Step S2014: Determine whether the statistical information of the queried data is the same as the statistical information of the corresponding source data.
[0097] The query data statistics are the calculation results of the received target financial data according to the corresponding statistical algorithm. The source data statistics are the calculation results of the target financial data in the financial system server according to the corresponding statistical algorithm.
[0098] Specifically, after confirming that the target financial data retrieved by the data query request has been synchronized to the archive system database, statistical information of the target financial data can be generated according to a statistical algorithm; a data statistics request is sent to the financial system server so that the financial system server can calculate the statistical data of the target financial data in the financial system according to the same statistical algorithm; the financial system server sends the statistical data of the target financial data in the financial system to the archive system server; after receiving the statistical data, the archive system server compares it with the statistical data calculated by the archive system server to determine whether the queried data statistics information is the same as the corresponding source data statistics information.
[0099] In this embodiment of the application, if it is determined that the statistical information of the queried data is the same as the statistical information of the corresponding source data, then it is determined that the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request; if it is determined that the statistical information of the queried data is the same as the statistical information of the corresponding source data, then it is determined that the received target financial data is inconsistent with the target financial data queried by the financial system server according to the data query request.
[0100] In this embodiment, the statistical information of the query data corresponding to the target financial data is calculated by a statistical algorithm corresponding to the type of the target financial data; a data statistical request is sent to the financial system server; the data statistical request includes the corresponding statistical algorithm; the source data statistical information calculated by the statistical algorithm corresponding to the data type of the target financial data is received from the data statistical request; if it is determined that the query data statistical information is the same as the corresponding source data statistical information, then it is determined that the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request. This method can more accurately determine whether the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request, without needing to compare data one by one, thus improving data comparison efficiency.
[0101] Step S202: If there is a discrepancy, identify the inconsistent data items in the target financial data and send the inconsistent data items to the user terminal.
[0102] Step S203: If consistent, determine the enabled encapsulation server so that at least one enabled encapsulation server encapsulates the target financial data.
[0103] Specifically, after confirming that the target financial data retrieved according to the data query request has been synchronized to the archive system database, it can be determined whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request. If they are inconsistent, it is determined that the target financial data transmission is incorrect. Step S202 is executed to identify inconsistent data items in the target financial data and send the inconsistent data items to the user terminal, so that the user can be aware that the synchronized target financial data is inconsistent and correct the inconsistent data items. If they are consistent, it can be determined that the target financial data transmission is correct. The obtained target financial data transmission error can be encapsulated, and the enabled encapsulation server can be determined so that at least one enabled encapsulation server encapsulates the target financial data.
[0104] The format file encapsulation method provided in this application embodiment determines whether the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request after it has been synchronized to the archive system database. If they are inconsistent, the inconsistent data items in the target financial data can be identified and sent to the user terminal for manual intervention to handle the inconsistent data, thereby avoiding the generation of target encapsulation files based on incorrect target financial data, which would lead to errors in the target encapsulation files.
[0105] Figure 4 A flowchart illustrating the method for determining inconsistent data items in target financial data provided in this application embodiment may optionally be as follows: Figure 4As shown, if there is a discrepancy in step S202, the inconsistent data items in the target financial data will be identified, and the inconsistent data items will be sent to the user terminal. This can be achieved by:
[0106] Step S2021: Divide the input financial data into multiple groups of financial data according to the timestamp.
[0107] The input financial data is either the target financial data or a set of financial data that indicates inconsistencies in statistical information.
[0108] For example, the target financial data can be divided into multiple groups of financial data according to the timestamps corresponding to the input financial data.
[0109] Step S2022: Calculate the query data statistics for each group of financial data and obtain the source data statistics for each group of financial data.
[0110] Step S2023: Determine at least one set of financial data whose statistical information in the query data is different from the statistical information in the corresponding source data.
[0111] If it is determined that the statistical information of the query data corresponding to a certain set of financial data is different from the statistical information of the corresponding source data, then the inconsistent data items are identified in the set of financial data, and subsequent steps are performed to identify the inconsistent data items in the set of financial data.
[0112] Step S2024: Determine whether a set of different financial data includes multiple data items.
[0113] Step S2025: Identify data items in different sets of financial data as inconsistent data items.
[0114] Step S2026: Identify the different sets of financial data as the input financial data.
[0115] Specifically, after determining at least one set of financial data with different statistical information, it is determined whether the at least one set of financial data includes multiple data items; if it is determined that a different set of financial data includes only one data item, then the data item can be determined to be an inconsistent data item; if it is determined that a different set of financial data includes multiple data items, then the multiple data items include inconsistent data items, the different set of financial data is determined to be the input financial data, and step S2021 and subsequent steps are executed to further divide the set of financial data into multiple sets of financial data until the different set of financial data includes one data item.
[0116] In this embodiment, the target financial data is divided into multiple groups based on the timestamps corresponding to the target financial data. Query data statistics for each group of financial data are calculated, and source data statistics for each group of financial data are obtained. If it is determined that the query data statistics for a certain group of financial data are the same as the corresponding source data statistics, then the inconsistent data item is identified within that group of financial data. This allows for the rapid identification of inconsistent data items without the need to compare data items sequentially, thus improving the efficiency of identifying inconsistent data items.
[0117] Based on the above embodiments, this embodiment involves a refinement of an implementation of step S104, in which the target financial data is sent to a message queue so that at least one enabled encapsulation server obtains the target financial data from the message queue and performs encapsulation operations on the target financial data to obtain a target encapsulation file. Specifically, it includes the following steps:
[0118] Step S301: Store the total task number corresponding to the target financial data in the total task status table, and determine the task status corresponding to the total task in the total task status table as incomplete.
[0119] Step S302: Determine the encapsulation task data corresponding to each encapsulation task in the target financial data, and send the encapsulation task data corresponding to each encapsulation task to the message queue, so that at least one encapsulation server can obtain the encapsulation task data corresponding to the next encapsulation task from the message queue after completing the previous encapsulation task, encapsulate the encapsulation task data to obtain the encapsulation file corresponding to the encapsulation task, and store the encapsulated encapsulation file corresponding to the encapsulation task.
[0120] Step S303: Store the packaging task data corresponding to each packaging task in the target financial data location and the packaging task number in the packaging task status table, and determine the task status corresponding to each packaging task in the packaging task status table as incomplete.
[0121] Step S304: In response to the packaging task completion information returned by the packaging server, determine the task status of the corresponding packaging task in the packaging task status table as completed.
[0122] Step S305: If it is determined that the task status of each packaging task in the packaging task status table corresponding to the total task is completed, then the task status of the total task in the total task status table is determined to be completed.
[0123] The overall task is to encapsulate the target financial data into at least one target encapsulation file. Encapsulation tasks are the tasks corresponding to encapsulating each target encapsulation file. The overall task status table stores the status of each overall task. One overall task corresponds to one encapsulation task status table, which stores the status of each encapsulation file under one overall task.
[0124] In this embodiment, after determining that the target financial data can be encapsulated, and determining that the overall task corresponding to the target financial data can be executed, the overall task number corresponding to the target financial data can be stored in the overall task status table. After sending the financial data corresponding to each encapsulation task to the message queue, the encapsulation task number can be stored in the encapsulation task status table. The enabled encapsulation server can obtain the financial data corresponding to one encapsulation task from the message queue and perform encapsulation operations on the financial data corresponding to one encapsulation task. After the encapsulation operation is completed, the next financial data corresponding to the encapsulation task can be obtained from the message queue. After determining that the enabled encapsulation server has completed an encapsulation task, the task status corresponding to that encapsulation task in the encapsulation task status table can be updated from incomplete to completed. After determining that the task status of each encapsulation task in the overall task's encapsulation task status table is either completed or failed, the task status corresponding to the overall task in the overall task status table can be determined as completed.
[0125] In existing technologies, the granularity of the marked state is too large. If one encapsulation task fails, the corresponding overall task will be re-executed, resulting in duplicate calculations and wasted resources. Specifically, during the layout encapsulation process, horizontal task segmentation is performed only based on a single dimension of the accounting unit, resulting in a large segmentation. When a task fails, the previously completed tasks need to be re-executed, which seriously wastes server computing power and affects task processing time.
[0126] In this embodiment, a total task status table and a packaged task status table are used to store the task status, which allows users to know the completion status of the total task and the completion status of each packaged task, thus refining the granularity of the status marking. Storing the status of each packaged task means that if a packaged task fails, only that packaged task will be executed again, avoiding duplicate calculations and resource waste.
[0127] Step S306: In response to the packaging task failure information returned by the packaging server, determine the task status of the corresponding packaging task in the packaging task status table as execution failure.
[0128] Step S307: Send the data of the failed packaging task corresponding to the failed packaging task in the packaging task status table to the user terminal at the location of the target financial data so that the user can process the data of the failed packaging task.
[0129] Among them, the packaging task data consists of a portion of the target financial data used to execute the packaging task.
[0130] In this embodiment, after the overall task is completed, the location of the failed packaging task data in the target financial data can be obtained from the packaging task status table, and packaging task failure information including that location can be sent to the user terminal so that the user can process the failed packaging task data. For example, the packaging task failure information can be sent to the user terminal via email.
[0131] In this embodiment, in response to the packaging task failure information returned by the packaging server, the task status of the corresponding packaging task in the packaging task status table is determined to be execution failure; the packaging task data corresponding to the failed packaging task in the packaging task status table is sent to the user terminal at the location of the target financial data, so that the user can process the packaging task data that failed. The failed packaging task can be determined through the packaging task status table, and after the user processes the packaging task data that failed, the failed packaging task is re-executed to complete the packaging operation for that portion of the packaging task data.
[0132] Figure 5 This is a schematic diagram of the structure of a layout document packaging device provided in an embodiment of this application. The layout document packaging device provided in this embodiment can execute the processing flow provided in the layout document packaging method embodiment. Figure 5 As shown, the format document packaging device 50 includes: a sending module 501, a data determination module 502, a quantity determination module 503, and an execution module 504.
[0133] Specifically, the sending module 501 is used to generate a data query request according to a preset query splitting strategy and send the data query request to the financial system server.
[0134] The data determination module 502 is used to determine, in response to the successful execution information of the data query request, that the target financial data retrieved according to the data query request has been synchronized to the archive system database.
[0135] The quantity determination module 503 is used to determine the number of packaging servers to be activated based on the total number of target packaging files corresponding to the target financial data.
[0136] The execution module 504 is used to send the target financial data to the message queue so that at least one enabled encapsulation server can obtain the target financial data from the message queue, perform encapsulation operations on the target financial data to obtain the target encapsulation file, and store the encapsulated target encapsulation file.
[0137] The apparatus provided in this application embodiment can be specifically used to execute the method embodiment provided in the above embodiment, and the specific functions will not be repeated here.
[0138] Optionally, the sending module 501 is specifically used to: split the accounting unit, year, accounting period, and accounting subject of the financial data to be encapsulated according to the corresponding preset query splitting strategy to generate at least one multi-dimensional query condition; the financial data to be encapsulated includes the target financial data queried according to at least one multi-dimensional query condition; and generate at least one corresponding data query request according to at least one multi-dimensional query condition.
[0139] Optionally, the data determination module 502 is further configured to: determine whether the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request; if they are inconsistent, determine the inconsistent data items in the target financial data and send the inconsistent data items to the user terminal.
[0140] Optionally, the data determination module 502 includes: a calculation unit; the calculation unit is used to: calculate query data statistics information corresponding to the target financial data according to the statistical algorithm corresponding to the type of target financial data; send a data statistics request to the financial system server; the data statistics request includes the corresponding statistical algorithm; receive the source data statistics information calculated according to the statistical algorithm corresponding to the data type of the target financial data sent by the data statistics request; if it is determined that the query data statistics information is the same as the corresponding source data statistics information, then it is determined that the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request.
[0141] Optionally, the calculation unit is specifically used for: if the type of target financial data includes accounting vouchers, then calculating the number of query data vouchers corresponding to the target financial data of the accounting voucher type according to the preset accounting unit, year, and accounting period splitting strategy; the query data statistics information includes the number of query data vouchers; if the type of target financial data includes subsidiary ledgers, then calculating the query data statistics amount corresponding to the target financial data of the subsidiary ledger type according to the preset accounting unit, year, accounting period, and accounting subject splitting strategy; the query data statistics information includes the query data statistics amount.
[0142] Optionally, the data determination module 502 further includes: a data item determination unit; the data item determination unit is used to: divide the target financial data into multiple groups of financial data according to the timestamp corresponding to the target financial data; calculate the query data statistics corresponding to each group of financial data and obtain the source data statistics corresponding to each group of financial data; if it is determined that the query data statistics corresponding to a certain group of financial data are the same as the corresponding source data statistics, then determine that the inconsistent data item is in the group of financial data, and determine the inconsistent data item in the group of financial data.
[0143] Optionally, the execution module 504 is specifically used to: store the total task number corresponding to the target financial data in the total task status table, and determine the task status corresponding to the total task in the total task status table as incomplete; determine the encapsulation task data corresponding to each encapsulation task in the target financial data, send the encapsulation task data corresponding to each encapsulation task to the message queue, so that at least one encapsulation server, after completing the previous encapsulation task, obtains the encapsulation task data corresponding to the next encapsulation task from the message queue, encapsulates the encapsulation task data to obtain the encapsulation file corresponding to the encapsulation task, and stores the encapsulated file corresponding to the encapsulation task; associate and store the position of the encapsulation task data corresponding to each encapsulation task in the target financial data with each encapsulation task number in the encapsulation task status table, and determine the task status corresponding to each encapsulation task in the encapsulation task status table as incomplete.
[0144] Optionally, the execution module 504 is further configured to: in response to the packaging task completion information returned by the packaging server, determine the task status of the corresponding packaging task in the packaging task status table as completed; if it is determined that the task status of each packaging task in the packaging task status table corresponding to the total task is completed, then determine the task status of the total task in the total task status table as completed.
[0145] Optionally, the execution module 504 is further configured to: in response to the packaging task failure information returned by the packaging server, determine the task status of the corresponding packaging task in the packaging task status table as execution failure; and send the packaging task data corresponding to the failed packaging task in the packaging task status table to the user terminal at the location of the target financial data, so that the user can process the packaging task data that failed to be packaged.
[0146] The apparatus provided in this application embodiment can be specifically used to execute the above method embodiments, and its specific functions will not be described in detail here.
[0147] Figure 6 This is a schematic diagram of the structure of the file system server provided in the embodiments of this application, such as... Figure 6 As shown, this application also provides a file system server 60, including: a processor 601, and a memory 602 and a transceiver 603 communicatively connected to the processor 601. The memory 602 stores computer-executable instructions; the transceiver 603 is used for sending and receiving data; the processor 601 executes the computer-executable instructions stored in the memory 602 to implement the method provided in any embodiment of this application.
[0148] Specifically, the program may include program code, which includes computer-executable instructions. Memory 602 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device. The computer-executable instructions are stored in memory 602 and configured to be executed by processor 601 to implement the method provided in any embodiment of this application. Related descriptions can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and will not be elaborated upon here.
[0149] In this embodiment, the memory 602 and the processor 601 are connected via a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0150] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method provided in any embodiment of this application.
[0151] This application also provides a computer program product, including computer execution instructions, which, when executed by a processor, implement the method provided in any embodiment of this application.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0153] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0154] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in a combination of hardware and software functional modules.
[0155] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable full-path fusion device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0156] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0157] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0158] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0159] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for packaging layout files, characterized in that, Applications to archive system servers include: The financial data to be packaged is split into accounting units, years, accounting periods, and accounting subjects according to a preset query splitting strategy to generate at least one multi-dimensional query condition. At least one data query request is generated according to the at least one multi-dimensional query condition, and the data query request is sent to the financial system server. The financial data to be packaged includes the target financial data queried according to at least one multi-dimensional query condition. In response to the successful execution information of the data query request, it is determined that the target financial data retrieved according to the data query request has been synchronized to the archive system database; The number of packaging servers to be activated is determined based on the total number of target packaged files corresponding to the target financial data. The target financial data is sent to a message queue so that at least one encapsulation server can retrieve the target financial data from the message queue, encapsulate the target financial data to obtain a target encapsulation file, and store the encapsulated target encapsulation file. When storing the encapsulated target encapsulation file, it is stored according to a preset rule path. The preset rule path is a path assembled by the corresponding accounting unit, year, accounting period, and accounting subject.
2. The method according to claim 1, characterized in that, After responding to the successful execution information of the data query request and determining that the target financial data retrieved according to the data query request has been synchronized to the archive system database, the method further includes: Determine whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request; If there is a discrepancy, the inconsistent data items in the target financial data are identified and sent to the user terminal.
3. The method according to claim 2, characterized in that, The step of determining whether the received target financial data is consistent with the target financial data retrieved by the financial system server according to the data query request includes: Calculate the statistical information of the query data corresponding to the target financial data according to the statistical algorithm corresponding to the type of target financial data; Send a data statistics request to the financial system server; the data statistics request includes the corresponding statistical algorithm; Receive source data statistical information sent by the data statistics request, calculated by the statistical algorithm corresponding to the data type of the target financial data; If it is determined that the statistical information of the queried data is the same as the statistical information of the corresponding source data, then it is determined that the received target financial data is consistent with the target financial data queried by the financial system server according to the data query request.
4. The method according to claim 3, characterized in that, The statistical algorithm for calculating the query data statistics corresponding to the target financial data based on the type of target financial data includes: If the type of target financial data is determined to include accounting vouchers, the number of query data vouchers corresponding to the target financial data of the accounting voucher type is calculated based on the preset accounting unit, year, and accounting period splitting strategy; the query data statistics information includes the number of query data vouchers; If the type of target financial data is determined to include subsidiary ledgers, the statistical amount of the query data corresponding to the target financial data of the subsidiary ledger type is calculated based on the preset accounting unit, year, accounting period, and accounting subject splitting strategy; the statistical amount of the query data includes the statistical amount of the query data.
5. The method according to claim 3, characterized in that, The determination of inconsistent data items in the target financial data includes: The target financial data is divided into multiple groups of financial data according to the timestamps corresponding to the target financial data. Calculate the query data statistics for each group of financial data and obtain the source data statistics for each group of financial data; If it is determined that the statistical information of the query data corresponding to a certain set of financial data is the same as the statistical information of the corresponding source data, then the inconsistent data items in that set of financial data are identified.
6. The method according to claim 1, characterized in that, Sending the target financial data to the message queue further includes: Store the total task number corresponding to the target financial data in the total task status table, and determine the task status corresponding to the total task in the total task status table as incomplete. Determine the encapsulation task data corresponding to each encapsulation task in the target financial data, send the encapsulation task data corresponding to each encapsulation task to the message queue, so that at least one encapsulation server can obtain the encapsulation task data corresponding to the next encapsulation task from the message queue after completing the previous encapsulation task, encapsulate the encapsulation task data to obtain the encapsulation file corresponding to the encapsulation task, and store the encapsulated encapsulation file corresponding to the encapsulation task. The packaging task data corresponding to each packaging task is stored in the target financial data location and the packaging task number in the packaging task status table, and the task status corresponding to each packaging task in the packaging task status table is determined as incomplete.
7. The method according to claim 6, characterized in that, After sending the target financial data to the message queue, the method further includes: In response to the packaging task completion information returned by the packaging server, the task status of the corresponding packaging task in the packaging task status table is determined to be completed; If it is determined that the status of each packaging task in the status table corresponding to the overall task is "completed", then the status of the overall task in the status table corresponding to the overall task will be determined as "completed".
8. The method according to claim 6, characterized in that, After sending the target financial data to the message queue, the method further includes: In response to the packaging task failure information returned by the packaging server, the task status of the corresponding packaging task in the packaging task status table is determined to be execution failure; The data of the failed packaging tasks in the packaging task status table is sent to the user terminal at the location of the target financial data so that the user can process the data of the failed packaging tasks.
9. A formatted document packaging device, characterized in that, include: The sending module is used to generate data query requests according to a preset query splitting strategy and send the data query requests to the financial system server. The data confirmation module is used to confirm, in response to the successful execution information of the data query request, that the target financial data retrieved according to the data query request has been synchronized to the archive system database. The quantity determination module is used to determine the number of packaging servers to be activated based on the total number of target packaging files corresponding to the target financial data; The execution module is used to send the target financial data to the message queue, so that at least one encapsulation server is enabled to obtain the target financial data from the message queue and perform encapsulation operation on the target financial data to obtain the target encapsulation file, and store the encapsulated target encapsulation file. When storing the encapsulated target encapsulation file, it is stored according to a preset rule path. The preset rule path is a path assembled from the corresponding accounting unit, year, accounting period, and accounting subject; The sending module is specifically used to split the accounting unit, year, accounting period, and accounting subject of the financial data to be packaged according to a preset query splitting strategy to generate at least one multi-dimensional query condition, generate at least one corresponding data query request according to the at least one multi-dimensional query condition, and send the data query request to the financial system server; the financial data to be packaged includes the target financial data queried according to at least one multi-dimensional query condition.
10. An archive system server, characterized in that, include: A processor, and a memory and a transceiver communicatively connected to the processor; The memory stores computer-executed instructions; the transceiver is used for sending and receiving data. The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.
12. A computer program product comprising computer-executable instructions, characterized in that, When the computer execution instructions are executed by the processor, they implement the method as described in any one of claims 1-8.