Accounting and taking depreciation processing method and device

By generating unit code mapping information in the asset management system and creating depreciation business sub-tables, the inefficient query efficiency caused by the huge amount of data of depreciation details and depreciation sub-tables is solved, and the effect of reducing the amount of data of depreciation-related physical tables and improving asset depreciation efficiency is achieved.

CN119831179AInactive Publication Date: 2025-04-15BEIJING JOIN CHEER SOFTWARE
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510309765.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-04-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the asset management system, the amount of data of the depreciation detailed list and the depreciation sub-table is huge, resulting in low query efficiency. How to reduce the amount of depreciation-related physical table data and improve asset depreciation efficiency without affecting the database function and historical query data accuracy.

Method used

When the depreciation business table meets the trigger conditions, it determines the first unit code set of units to be divided, generates unit code mapping information, creates depreciation business sub-tables, migrates business data to the sub-tables, and determines whether the archive conditions are met at every preset time, and generates archive tables or sub-tables to reduce the amount of data.

Benefits of technology

It effectively reduces the amount of business data in the depreciated business table, improves the user's operational efficiency of business data, further reduces the amount of data through archive tables and subtables, and improves the operational efficiency. It is also compatible with the existing data modeling framework and does not affect the database function and the accuracy of historical query data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831179A_ABST
    Figure CN119831179A_ABST
Patent Text Reader

Abstract

The invention discloses a calculation and extraction depreciation processing method and device, and relates to the technical field of business data processing, and the method comprises the steps: determining a first unit code set of a unit of a to-be-divided table when a depreciation business table meets a triggering condition; if the unit code is not contained in the unit code set mapping sub-table, generating unit code mapping information; adding unit code mapping information corresponding to each unit code into the unit code set mapping sub-table; according to each piece of unit code mapping information, scanning a header field of a depreciation service table, and creating a depreciation service sub-table; migrating service data in the depreciation service table to a depreciation service sub-table; judging whether the depreciation service table and / or the depreciation service sub-table meet archiving conditions or not every preset duration, and generating a depreciation service archiving table and / or a depreciation service archiving sub-table if the depreciation service table and / or the depreciation service sub-table meet the archiving conditions; and after a depreciation service operation request of the user is received, processing in the table corresponding to the unit to which the user belongs. According to the invention, the efficiency of assertion and depreciation of assets can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of big data processing, and in particular to a method and device for processing depreciation. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.

[0003] Depreciation management is an important module of the asset management system. Depreciation is the pre-calculation of certain depreciation expenses that have occurred but not actually paid during the company's financial processing. Due to the multiple levels of institutions, large asset stocks, and multiple depreciation periods, the depreciation details table and depreciation sub-table are huge, and the data volume grows by tens of millions every year. Depreciation, depreciation details query and other summary statistics query are slow. In addition, the query center of the asset management system often uses the database developed by each institution, and uses a framework for data modeling and persistence.

[0004] Therefore, how to reduce the amount of depreciation-related physical table data while being compatible with the existing data modeling framework and without affecting the normal use of database functions and the accuracy of historical query data in order to improve asset depreciation efficiency is a key issue that needs to be solved at present. Summary of the invention

[0005] An embodiment of the present invention provides a depreciation processing method for improving the depreciation efficiency of assets. The method includes:

[0006] When the depreciation business table meets the triggering condition, determine the first unit code set of the unit to be divided into tables;

[0007] If the unit code in the first unit code set is not included in the unit code set mapping sub-table, generating unit code mapping information according to the first unit code set, the unit code mapping information being used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table;

[0008] Add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table;

[0009] According to each unit code mapping information, scan the header fields of the depreciation business table and create a depreciation business sub-table;

[0010] Migrate the business data in the depreciation business table to the depreciation business sub-table;

[0011] At preset intervals, determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that do not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions;

[0012] After receiving the depreciation business operation request from the user, the depreciation business operation request is processed in the depreciation business table and depreciation business archive table, or the depreciation business sub-table and depreciation business archive sub-table corresponding to the unit to which the user belongs.

[0013] The embodiment of the present invention further provides a depreciation processing device for improving the depreciation efficiency of assets, the device comprising:

[0014] A module for determining units of tables to be divided, used to determine a first unit code set of units of tables to be divided when the depreciation business table meets the triggering condition;

[0015] A unit code mapping information generating module, configured to generate unit code mapping information according to the first unit code set if the unit code in the first unit code set is not included in the unit code set mapping sub-table, wherein the unit code mapping information is used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table;

[0016] A unit code set mapping sub-table adding module, used to add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table;

[0017] The depreciation business sub-table creation module is used to scan the header fields of the depreciation business table according to each unit code mapping information and create a depreciation business sub-table;

[0018] Migration module, used to migrate business data in the depreciation business table to the depreciation business sub-table;

[0019] A summary module is used to determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions at preset intervals, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that do not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions;

[0020] The request processing module is used to process the depreciation business operation request in the depreciation business table and depreciation business archive table, or the depreciation business sub-table and depreciation business archive sub-table corresponding to the unit to which the user belongs after receiving the depreciation business operation request from the user.

[0021] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned depreciation processing method when executing the computer program.

[0022] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned depreciation processing method is implemented.

[0023] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned depreciation processing method is implemented.

[0024] In an embodiment of the present invention, when the depreciation business table meets the trigger condition, the first unit code set of the unit to be sub-table is determined; if the unit code in the first unit code set is not included in the unit code set mapping sub-table, unit code mapping information is generated according to the first unit code set, and the unit code mapping information is used to identify the mapping relationship between each unit code and the corresponding depreciation business sub-table; the unit code mapping information corresponding to each unit code is added to the unit code set mapping sub-table; according to each unit code mapping information, the header field of the depreciation business table is scanned to create a depreciation business sub-table; the business data in the depreciation business table is migrated to the depreciation business table old business sub-table; at preset time intervals, determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that does not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions; after receiving the user's depreciation business operation request, process the depreciation business operation request in the depreciation business table and the depreciation business archiving table, or the depreciation business sub-table and the depreciation business archiving sub-table corresponding to the unit to which the user belongs. Through the above steps, the business data in the depreciation business table can be migrated to the depreciation business sub-table, reducing the amount of business data in the depreciation business table and improving the user's operating efficiency on the business data; generating a depreciation business archive table and / or a depreciation business archive sub-table further reduces the amount of data in each of the above tables and further improves the user's operating efficiency on the business data. In addition, this solution is not limited by the database type or the data modeling framework. Therefore, it is compatible with the existing data modeling framework and can reduce the amount of depreciation-related physical table data without affecting the normal use of the database function and the accuracy of historical query data, so as to improve asset depreciation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0026] Figure 1 A flowchart of a depreciation processing method provided in an embodiment of the present invention;

[0027] Figure 2 A flowchart of determining a first unit code set in an embodiment of the present invention;

[0028] Figure 3 A flowchart of generating unit code mapping information in an embodiment of the present invention;

[0029] Figure 4 A flowchart of creating a depreciation business sub-table in an embodiment of the present invention;

[0030] Figure 5 It is a flow chart of migrating business data in the depreciation business table to the depreciation business sub-table in an embodiment of the present invention;

[0031] Figure 6 A flowchart of generating a depreciation business filing table and / or a depreciation business filing sub-table in an embodiment of the present invention;

[0032] Figure 7 A flowchart of processing a depreciation business operation request in an embodiment of the present invention;

[0033] Figure 8 A schematic diagram of a depreciation processing device provided in an embodiment of the present invention;

[0034] Fig. 9 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0036] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0037] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0038] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps is not limited and can be appropriately adjusted as needed.

[0039] Figure 1 The flowchart of the depreciation processing method in the embodiment of the present invention includes:

[0040] S101, when the depreciation business table meets the triggering condition, determining the first unit code set of the unit to be divided into the table;

[0041] S102: if the unit code in the first unit code set is not included in the unit code set mapping sub-table, generate unit code mapping information according to the first unit code set, wherein the unit code mapping information is used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table;

[0042] S103, adding unit code mapping information corresponding to each unit code in the unit code set mapping sub-table;

[0043] S104, according to each unit code mapping information, scan the header field of the depreciation business table and create a depreciation business sub-table;

[0044] S105, migrating the business data in the depreciation business table to the depreciation business sub-table;

[0045] S106, at a preset time interval, determining whether the depreciation business table and / or the depreciation business sub-table meet the archiving condition, and if so, generating a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain summary data of business data that meet the archiving condition and business data that do not meet the archiving condition, and the depreciation business archiving table and the depreciation business archiving sub-table retain business data that meet the archiving condition;

[0046] S107, after receiving the depreciation business operation request from the user, the depreciation business operation request is processed in the depreciation business table and the depreciation business archive table, or the depreciation business sub-table and the depreciation business archive sub-table corresponding to the unit to which the user belongs.

[0047] In the embodiment of the present invention, the business data in the depreciation business table can be migrated to the depreciation business sub-table, thereby reducing the amount of business data in the depreciation business table and improving the user's operating efficiency on the business data; generating a depreciation business archive table and / or a depreciation business archive sub-table further reduces the amount of data in each of the above tables and further improves the user's operating efficiency on the business data. In addition, this solution is not limited by the database type or the data modeling framework. Therefore, it is compatible with the existing data modeling framework and can reduce the amount of data in the depreciation-related physical tables without affecting the normal use of the database function and the accuracy of the historical query data, thereby improving the asset depreciation efficiency.

[0048] The above depreciation treatment method is introduced in detail below.

[0049] With respect to the above S101, when the depreciation business table meets the triggering condition, a first unit code set of the unit to be divided into the table is determined;

[0050] The depreciation business table includes a provision form sub-table and a depreciation details table. The depreciation business sub-table includes a provision form sub-table and a depreciation details table. The provision form sub-table is used to store the business data of the card details participating in the provision of depreciation in each account period. The depreciation details table is used to store the depreciation data generated by all depreciation-related businesses.

[0051] The units in the embodiment of the present invention are grass-roots organizations, and each unit has its own unit code, which can be queried or imported through Excel.

[0052] See also Figure 2 This is a flow chart of determining a first unit code set in an embodiment of the present invention. In one embodiment, when a depreciation business table meets a trigger condition, determining a first unit code set of a unit to be divided into a table includes:

[0053] S201, querying the depreciation business table according to a preset frequency, and counting the data volume of each unit in the depreciation business table;

[0054] S202, after the data volume of each unit reaches a preset scale, it is determined that the unit needs to be divided into tables, and a reminder suggestion is generated and displayed to the user;

[0055] S203, after receiving the confirmation instruction from the user according to the reminder suggestion feedback, determining that the trigger condition is met, obtaining the unit in the user confirmation instruction, and using it as the unit to be divided into tables;

[0056] S204, scanning the unit code set mapping table, querying whether there is a table record for each unit to be divided, if not, obtaining the unit code of the unit to be divided;

[0057] S205: Add the unit codes of all units to be divided into tables into a first unit code set.

[0058] Specifically, the preset scale of the data volume can be determined by the user. For example, if the volume of unit depreciation detail data is greater than 20 million or the volume of asset cards is greater than 1 million, the user can be a depreciation business manager.

[0059] For S102, if the unit code in the first unit code set is not included in the unit code set mapping sub-table, generating unit code mapping information according to the first unit code set;

[0060] In the embodiment of the present invention, the unit code mapping information includes the unit code, the sub-table serial number, the accrual form sub-table name, the accrual form sub-table migration status, the depreciation detail table name, and the depreciation detail table migration status.

[0061] Figure 3 This is a flow chart of generating unit code mapping information in an embodiment of the present invention. Generating unit code mapping information according to the unit code includes:

[0062] S301, obtaining the serial number of the current depreciation process, wherein one sub-table serial number corresponds to at least one unit code;

[0063] S302, generating a sub-table name of the accrual form according to the sub-table name and serial number of the accrual form in accordance with the preset rules;

[0064] S303: Generate a depreciation detail table name according to the depreciation detail table name and the serial number according to the preset rules.

[0065] For S103, add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table;

[0066] Table 1 is an example of a unit code set mapping sub-table in an embodiment of the present invention. Referring to Table 1, a sub-table serial number corresponds to at least one unit code. For example, serial number 1 corresponds to the unit codes of two units, which means that the business data of units XX01 and XX02 need to be merged together and put into JTD_1 and ZJMX_1 respectively. XX03 can correspond to a serial number, and the sub-tables are JTD_2 and ZJMX_2. In an embodiment of the present invention, the sub-table name of the provision form is generated based on the depreciation detail table name and the serial number, where JTD is the depreciation detail table name. The corresponding preset rule is to connect the depreciation detail table name and the serial number with an underscore. This naming method is easy to query, manage and record.

[0067] Table 1

[0068]

[0069] For S104, according to each unit code mapping information, scan the header fields of the depreciation business table and create a depreciation business sub-table;

[0070] Figure 4 The flowchart of creating a depreciation business sub-table in an embodiment of the present invention is as follows. In one embodiment, according to each unit code mapping information, the header field of the depreciation business table is scanned to create a depreciation business sub-table, including:

[0071] S401, obtaining the name of the provision sheet sub-table and the name of the depreciation detail table in each unit code mapping information;

[0072] S402, scanning the header fields of the depreciation business table, using the header fields in the provision form sub-table as the header fields of the provision form sub-table, and using the header fields in the depreciation detail table as the header fields of the depreciation detail table;

[0073] S403, generating a statement for creating a accrual form sub-table according to the accrual form sub-table name and the corresponding header field;

[0074] S404, generating a statement for creating a depreciation detail table according to the depreciation detail table name and the corresponding table header field;

[0075] S405, batch execute all statements for creating accrual form sub-tables and depreciation detail form sub-tables to create accrual form sub-tables and depreciation detail form sub-tables.

[0076] Specifically, the statements for creating the accrual form sub-table and the depreciation detail table can be DDL statements. When all DDL statements are executed in batches, if one execution fails, it does not affect other executions, and the failed statements can be retried.

[0077] For S105, migrate the business data in the depreciation business table to the depreciation business sub-table;

[0078] Figure 5 The flowchart of migrating business data from the depreciation business table to the depreciation business sub-table in an embodiment of the present invention is as follows. In one embodiment, migrating business data from the depreciation business table to the depreciation business sub-table includes:

[0079] S501: Create a accrual form sub-table migration task for each empty accrual form sub-table, and create a depreciation detail table migration task for each empty depreciation detail table.

[0080] S502, using multi-threaded asynchronous parallel execution of all accrual form migration tasks and depreciation detail form migration tasks;

[0081] S503, for the accrual form sub-table that has completed the accrual form sub-table migration task, updating the accrual form sub-table migration status in the unit code mapping information;

[0082] S504: for the depreciation detail table for which the depreciation detail table migration task has been completed, update the depreciation detail table migration status in the unit code mapping information.

[0083] Specifically, after the migration is completed, the migration status of the depreciation detail table and the accrual form sub-table in the unit code mapping information are updated to migrated.

[0084] Since the units of depreciation data and the depreciation sub-table and depreciation detail table are unrelated, in order to rationally utilize system resources, the number of application nodes is calculated first and the data migration tasks of each unit (depreciation sub-table migration tasks and depreciation detail table migration tasks) are distributed to certain nodes for parallel execution. For example, if there are 12 application nodes and 50% of the nodes participate in data migration, the migration tasks of 6 units are distributed to 6 nodes for execution. One node uses a fixed thread pool with 3 core threads for parallel execution.

[0085] After the sub-table is created, the unit code set mapping sub-table will be scanned to check whether the depreciation business sub-table name of each unit to be sub-tabled exists in the database. If it is found that it is missing, the table creation operation will be triggered again (there will be no situation where multiple data are created in the sub-table).

[0086] If the final sub-table is not created successfully, the exception will be automatically captured and an early warning will be triggered to remind the system administrator to intervene manually.

[0087] For S106, at every preset time period, it is determined whether the depreciation business table and / or the depreciation business sub-table meet the archiving condition. If so, a depreciation business archiving table and / or a depreciation business archiving sub-table are generated, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving condition and the business data that do not meet the archiving condition, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving condition;

[0088] Due to the different situations of each project and the different requirements for database management, it may not be possible to fully implement the depreciation table by unit. Even if some of the tables are divided by unit, there are still some units (universities, hospitals, etc.) with large asset data. After more than ten years of business, the accumulated depreciation data has reached tens of millions or even hundreds of millions, so the depreciation data needs to be archived again; the preset duration depends on the actual situation, for example, it can be one year; taking the asset system to conduct annual asset report statistics every year as an example, the annual report of the previous year is reported and reviewed before June of each year, and the annual report contains depreciation data statistics. Example: It is now December 2024, and the 2023 asset annual report has been submitted for review on June 30, 2024. The business data before December 2023 in the asset system can be archived, and the business data after December 2023 can be retained. If the current time is April 2024, since the 2023 asset annual report submission and review have not been completed, the asset system can only archive the business data before December 2022 and retain the business data after December 2022.

[0089] Figure 6 The flowchart of generating a depreciation business filing table and / or a depreciation business filing sub-table in an embodiment of the present invention, in one embodiment, judging whether the depreciation business table and / or the depreciation business sub-table meets the filing condition at every preset time, and if so, generating the depreciation business filing table and / or the depreciation business filing sub-table, includes:

[0090] S601: if the depreciation business archive table does not exist and the depreciation business table meets the archiving conditions, rename the depreciation business table to the depreciation business archive table; generate a depreciation business table creation statement according to the table header field corresponding to the depreciation business archive table, execute the depreciation business table creation statement, and generate the depreciation business table; migrate the business data in the depreciation business archive table that does not meet the archiving conditions to the depreciation business table; and statistically summarize the business data in the depreciation business archive table according to the preset summary rules and add it to the depreciation business table;

[0091] S602: At every preset time, if there is a depreciation business filing table and the depreciation business table meets the filing condition, the business data meeting the filing condition in the depreciation business table is statistically summarized according to the preset summary rule, added to the depreciation business filing table, and the business data meeting the filing condition in the depreciation business table is deleted;

[0092] S603: if there is no depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, rename the depreciation business sub-table to the depreciation business archiving sub-table; generate a depreciation business sub-table creation statement according to the header field corresponding to the depreciation business archiving sub-table, execute the depreciation business sub-table creation statement, and generate the depreciation business sub-table; migrate the business data in the depreciation business archiving sub-table that does not meet the archiving conditions to the depreciation business sub-table; and add the business data in the depreciation business archiving sub-table to the depreciation business sub-table after statistical aggregation according to the preset aggregation rules;

[0093] S604: At preset time intervals, if there is a depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, the business data that meets the archiving conditions in the depreciation business sub-table is statistically summarized according to the preset summary rules, and added to the depreciation business archiving sub-table, and the business data that meets the archiving conditions in the depreciation business sub-table is deleted.

[0094] Specifically, archiving is divided into two situations: initial archiving and non-initial archiving.

[0095] For the first archiving, the depreciation business sub-table creation statement and the depreciation business table creation statement can use the ALERT table operation, which is very fast. Since the amount of data in the original table is very large (2000 to present), if the archive table is directly created to migrate the historical data (before 2023) from the original table to the archive table, 90% of the data needs to be migrated, which is relatively inefficient. The ALERT table operation is used to directly modify the original table to the archive table and then create the original table structure. The archive table data (after 2023) is migrated to the formal table (depreciation business sub-table and depreciation business table), which requires about 10% of the data.

[0096] When generating the depreciation business table (including the accrual form sub-table and) and the depreciation business sub-table (including the accrual form sub-table and the depreciation detail table), each unit is migrated once, and multiple units can use multi-threaded asynchronous mode. If a failure occurs, the migration status of each unit at each step is recorded and does not affect the data migration of other units. The migration can be repeated for the unit where the migration failed.

[0097] Specifically, the preset summary rules can be determined by the user, for example, taking the average value, sum, difference, etc. of all columns. The preset summary rules can be customized based on user experience and possible subsequent operations on the depreciation business table, such as query, etc.

[0098] For non-initial archiving, business data within a preset period of time can be summarized according to preset summary rules.

[0099] In addition, in the embodiment of the present invention, business data migration refers to moving data from one table to another table, and the data in the original table needs to be deleted.

[0100] With respect to S107, after receiving the depreciation business operation request from the user, the depreciation business operation request is processed in the depreciation business table and the depreciation business archive table, or the depreciation business sub-table and the depreciation business archive sub-table corresponding to the unit to which the user belongs.

[0101] Figure 7 The flowchart of processing a depreciation business operation request in an embodiment of the present invention is as follows. In one embodiment, after receiving a depreciation business operation request from a user, processing the depreciation business operation request in a depreciation business table and a corresponding filing table corresponding to the unit to which the user belongs, or a depreciation business sub-table and a corresponding filing table, includes:

[0102] S701, after receiving a depreciation business operation request from a user, query the unit code set mapping sub-table to determine whether the unit to which the user belongs corresponds to the depreciation business table or the depreciation business sub-table;

[0103] S702, if the unit to which the user belongs corresponds to the depreciation business table, a database operation statement is generated according to the depreciation business operation request, and it is determined whether the application object of the depreciation business operation request is the depreciation business table or the depreciation business archive table, and the database operation statement is executed in the determined application object;

[0104] S703, if the unit to which the user belongs corresponds to the depreciation business sub-table, query the database operation statement corresponding to the depreciation business table according to the depreciation business operation request, add the configuration expression of the depreciation business sub-table to the database operation statement corresponding to the depreciation business table, and obtain the database operation statement corresponding to the depreciation business sub-table; determine whether the application object of the depreciation business operation request is the depreciation business sub-table or the depreciation business archiving sub-table, and execute the database operation statement corresponding to the depreciation business sub-table in the determined application object.

[0105] Specifically, depreciation business operation requests include adding, deleting, modifying, and querying business data, which can correspond to different database operation statements. For example, for newly added data, if the unit to which the user belongs corresponds to the depreciation business table, then the operation is performed in the depreciation business table or the depreciation business archive table. If the specific depreciation business operation request is to count the current business data, then the query can be performed in the depreciation business table. If the specific business data of the previous few days needs to be queried, it is necessary to operate in the depreciation business archive table.

[0106] In addition, for the depreciation business sub-table, the embodiment of the present invention proposes to add the configuration expression of the depreciation business sub-table to the database operation statement corresponding to the depreciation business table to obtain the database operation statement corresponding to the depreciation business sub-table, such as GetSplitTabSuffix(), which means: query the table name of the unit's provision form sub-table and the depreciation detail table. The specific implementation logic is to obtain the query statement to parse whether the data source contains this expression. If it does, query the mapping table according to the current data source name and unit code to obtain the table name after the sub-table and replace the data source. If it does not contain it, it remains unchanged. For example, select * from table name#getSplitTabSuffix() will be parsed as select *from table name_1 according to the logical calculation if the unit sub-table sql statement exists, and if it does not exist, it will be parsed as select * from table name.

[0107] The present invention also provides a depreciation processing device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to that of the depreciation processing method, the implementation of the device can refer to the implementation of the depreciation processing method, and the repeated parts will not be repeated.

[0108] like Figure 8 FIG. 1 is a schematic diagram of a depreciation processing device provided by an embodiment of the present invention, comprising:

[0109] The unit determination module 801 for the table to be divided is used to determine the first unit code set of the unit to be divided when the depreciation business table meets the trigger condition;

[0110] A unit code mapping information generating module 802 is used to generate unit code mapping information according to the first unit code set if the unit code in the first unit code set is not included in the unit code set mapping sub-table, wherein the unit code mapping information is used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table;

[0111] A unit code set mapping sub-table adding module 803 is used to add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table;

[0112] A depreciation business sub-table creation module 804 is used to scan the header fields of the depreciation business table according to each unit code mapping information and create a depreciation business sub-table;

[0113] Migration module 805, used to migrate the business data in the depreciation business table to the depreciation business sub-table;

[0114] The summary module 806 is used to determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving condition at a preset time interval, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving condition and the business data that do not meet the archiving condition, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving condition;

[0115] The request processing module 807 is used to process the depreciation business operation request in the depreciation business table and depreciation business archive table, or the depreciation business sub-table and depreciation business archive sub-table corresponding to the unit to which the user belongs after receiving the depreciation business operation request from the user.

[0116] In one embodiment, the module for determining the unit of the table to be divided is used for:

[0117] Query the depreciation business table according to the preset frequency and count the data volume of each unit in the depreciation business table;

[0118] When the data volume of each unit reaches the preset scale, it is determined that the unit needs to be sub-tabled, and reminder suggestions are generated and displayed to the user;

[0119] After receiving the confirmation instruction from the user according to the reminder suggestion feedback, it is determined that the trigger condition is met, and the unit in the user confirmation instruction is obtained and used as the unit to be divided into meters;

[0120] Scan the unit code set mapping table to check whether there is a table record for each unit to be divided. If not, obtain the unit code of the unit to be divided.

[0121] Add the unit codes of all units to be divided into the first unit code set.

[0122] In one embodiment, the depreciation business table includes a provision form sub-table and a depreciation detail table, and the depreciation business sub-table includes a provision form sub-table and a depreciation detail table;

[0123] The unit code mapping information includes the unit code, sub-table serial number, accrual form sub-table name, accrual form sub-table migration status, depreciation detail sub-table name, and depreciation detail sub-table migration status;

[0124] The unit code mapping information generation module is used to:

[0125] Get the serial number of the current depreciation process, where one sub-table serial number corresponds to at least one unit code;

[0126] Generate the sub-table name of the accrual form according to the sub-table name and serial number of the accrual form in accordance with the preset rules;

[0127] Generate depreciation detail table name according to preset rules and serial number.

[0128] In one embodiment, the depreciation business sub-table creation module is used to:

[0129] Get the accrual form sub-table name and depreciation detail form name in each unit code mapping information;

[0130] Scan the header fields of the depreciation business table, use the header fields in the accrual form sub-table as the header fields of the accrual form sub-table, and use the header fields in the depreciation detail table as the header fields of the depreciation detail table;

[0131] Generate the statement for creating the accrual form sub-table according to the accrual form sub-table name and the corresponding header fields;

[0132] Generate a statement to create a depreciation detail table based on the depreciation detail table name and the corresponding header fields;

[0133] Batch execute all statements for creating accrual form sub-tables and depreciation detail tables to create accrual form sub-tables and depreciation detail tables.

[0134] In one embodiment, the migration module is used to:

[0135] For each empty accrual form sub-table, create an accrual form sub-table migration task; for each empty depreciation form sub-table, create a depreciation form sub-table migration task;

[0136] Use multi-threaded asynchronous parallel execution of all accrual form migration tasks and depreciation detail form migration tasks;

[0137] For the accrual form sub-tables that have completed the accrual form sub-table migration task, update the accrual form sub-table migration status in the unit code mapping information;

[0138] For the depreciation detail table for which the depreciation detail table migration task has been completed, the depreciation detail table migration status in the unit code mapping information is updated.

[0139] In one embodiment, the aggregation module is used to:

[0140] If the depreciation business archive table does not exist and the depreciation business table meets the archiving conditions, rename the depreciation business table to the depreciation business archive table; generate a depreciation business table creation statement according to the header fields corresponding to the depreciation business archive table, execute the depreciation business table creation statement, and generate the depreciation business table; migrate the business data in the depreciation business archive table that does not meet the archiving conditions to the depreciation business table; and summarize the business data in the depreciation business archive table according to the preset summary rules, and add it to the depreciation business table;

[0141] At preset intervals, if a depreciation business archiving table exists and the depreciation business table meets the archiving conditions, the business data that meets the archiving conditions in the depreciation business table is summarized and added to the depreciation business archiving table according to the preset summary rules, and the business data that meets the archiving conditions in the depreciation business table is deleted;

[0142] If there is no depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, rename the depreciation business sub-table to the depreciation business archiving sub-table; generate a depreciation business sub-table creation statement according to the header field corresponding to the depreciation business archiving sub-table, execute the depreciation business sub-table creation statement, and generate the depreciation business sub-table; migrate the business data in the depreciation business archiving sub-table that does not meet the archiving conditions to the depreciation business sub-table; and according to the preset summary rules, summarize the business data in the depreciation business archiving sub-table and add it to the depreciation business sub-table;

[0143] At preset intervals, if there is a depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, the business data that meets the archiving conditions in the depreciation business sub-table is summarized and added to the depreciation business archiving sub-table according to the preset summary rules, and the business data that meets the archiving conditions in the depreciation business sub-table is deleted.

[0144] In one embodiment, the request processing module is used to:

[0145] After receiving the user's depreciation business operation request, query the unit code set mapping sub-table to determine whether the unit to which the user belongs corresponds to the depreciation business table or the depreciation business sub-table;

[0146] If the unit to which the user belongs corresponds to the depreciation business table, a database operation statement is generated according to the depreciation business operation request, and it is determined whether the application object of the depreciation business operation request is the depreciation business table or the depreciation business archive table, and the database operation statement is executed in the determined application object;

[0147] If the unit to which the user belongs corresponds to the depreciation business sub-table, according to the depreciation business operation request, query the database operation statement corresponding to the depreciation business table, add the configuration expression of the depreciation business sub-table to the database operation statement corresponding to the depreciation business table, and obtain the database operation statement corresponding to the depreciation business sub-table; determine whether the application object of the depreciation business operation request is the depreciation business sub-table or the depreciation business archiving sub-table, and execute the database operation statement corresponding to the depreciation business sub-table in the determined application object.

[0148] In summary, in the method and device proposed in the embodiment of the present invention, when the depreciation business table meets the trigger condition, the first unit code set of the unit to be sub-table is determined; if the unit code in the first unit code set is not included in the unit code set mapping sub-table, unit code mapping information is generated according to the first unit code set, and the unit code mapping information is used to identify the mapping relationship between each unit code and the corresponding depreciation business sub-table; the unit code mapping information corresponding to each unit code is added to the unit code set mapping sub-table; according to each unit code mapping information, the header field of the depreciation business table is scanned to create a depreciation business sub-table; the business code in the depreciation business table is mapped to the unit code set mapping sub-table; The depreciation business data is migrated to the depreciation business sub-table; at preset time intervals, it is determined whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions, and if so, a depreciation business archiving table and / or a depreciation business archiving sub-table is generated, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that do not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions; after receiving the user's depreciation business operation request, the depreciation business operation request is processed in the depreciation business table and the depreciation business archiving table corresponding to the unit to which the user belongs, or the depreciation business sub-table and the depreciation business archiving sub-table. Through the above steps, the business data in the depreciation business table can be migrated to the depreciation business sub-table, reducing the amount of business data in the depreciation business table and improving the user's operating efficiency on the business data; generating a depreciation business archive table and / or a depreciation business archive sub-table further reduces the amount of data in each of the above tables and further improves the user's operating efficiency on the business data. In addition, this solution is not limited by the database type or the data modeling framework. Therefore, it is compatible with the existing data modeling framework and can reduce the amount of depreciation-related physical table data without affecting the normal use of the database function and the accuracy of historical query data, so as to improve asset depreciation efficiency.

[0149] Based on the above invention concept, Fig. 9 As shown, the present invention also proposes a computer device 900, including a memory 910, a processor 920, and a computer program 930 stored in the memory 910 and executable on the processor 920, and the processor 920 implements the above-mentioned depreciation processing method when executing the computer program 930.

[0150] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned depreciation processing method is implemented.

[0151] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned depreciation processing method is implemented.

[0152] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0156] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for accruing depreciation, characterized in that: include: When the depreciation business table meets the triggering condition, determine the first unit code set of the unit to be divided into tables; If the unit code in the first unit code set is not included in the unit code set mapping sub-table, generating unit code mapping information according to the first unit code set, the unit code mapping information being used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table; Add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table; According to each unit code mapping information, scan the header fields of the depreciation business table and create a depreciation business sub-table; Migrate the business data in the depreciation business table to the depreciation business sub-table; At preset intervals, determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that do not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions; After receiving the depreciation business operation request from the user, the depreciation business operation request is processed in the depreciation business table and depreciation business archive table, or the depreciation business sub-table and depreciation business archive sub-table corresponding to the unit to which the user belongs.

2. The depreciation processing method according to claim 1, characterized in that: When the depreciation business table meets the triggering condition, the first unit code set of the unit to be divided into the table is determined, including: Query the depreciation business table according to the preset frequency and count the data volume of each unit in the depreciation business table; When the data volume of each unit reaches the preset scale, it is determined that the unit needs to be sub-tabled, and reminder suggestions are generated and displayed to the user; After receiving the confirmation instruction from the user according to the reminder suggestion feedback, it is determined that the trigger condition is met, and the unit in the user confirmation instruction is obtained and used as the unit to be divided into meters; Scan the unit code set mapping table to check whether there is a table record for each unit to be divided. If not, obtain the unit code of the unit to be divided. Add the unit codes of all units to be divided into the first unit code set.

3. The depreciation processing method according to claim 1, characterized in that: The depreciation business table includes a provision form sub-table and a depreciation detail table, and the depreciation business sub-table includes a provision form sub-table and a depreciation detail table; The unit code mapping information includes the unit code, sub-table serial number, accrual form sub-table name, accrual form sub-table migration status, depreciation detail sub-table name, and depreciation detail sub-table migration status; According to the unit code, unit code mapping information is generated, including: Get the serial number of the current depreciation process, where one sub-table serial number corresponds to at least one unit code; Generate the sub-table name of the accrual form according to the sub-table name and serial number of the accrual form in accordance with the preset rules; Generate depreciation detail table name according to preset rules and serial number.

4. The depreciation processing method according to claim 3, characterized in that: According to each unit code mapping information, scan the header fields of the depreciation business table and create a depreciation business sub-table, including: Get the accrual form sub-table name and depreciation detail form name in each unit code mapping information; Scan the header fields of the depreciation business table, use the header fields in the accrual form sub-table as the header fields of the accrual form sub-table, and use the header fields in the depreciation detail table as the header fields of the depreciation detail table; Generate the statement for creating the accrual form sub-table according to the accrual form sub-table name and the corresponding header fields; Generate a statement to create a depreciation detail table based on the depreciation detail table name and the corresponding header fields; Batch execute all statements for creating accrual form sub-tables and depreciation detail tables to create accrual form sub-tables and depreciation detail tables.

5. The depreciation processing method according to claim 3, characterized in that: Migrate the business data in the depreciation business table to the depreciation business sub-table, including: For each empty accrual form sub-table, create an accrual form sub-table migration task; for each empty depreciation form sub-table, create a depreciation form sub-table migration task; Use multi-threaded asynchronous parallel execution of all accrual form migration tasks and depreciation detail form migration tasks; For the accrual form sub-tables that have completed the accrual form sub-table migration task, update the accrual form sub-table migration status in the unit code mapping information; For the depreciation detail table for which the depreciation detail table migration task has been completed, the depreciation detail table migration status in the unit code mapping information is updated.

6. The depreciation processing method according to claim 1, characterized in that: At preset intervals, determine whether the depreciation business table and / or the depreciation business sub-table meets the archiving conditions. If so, generate the depreciation business archiving table and / or the depreciation business archiving sub-table, including: If the depreciation business archive table does not exist and the depreciation business table meets the archiving conditions, rename the depreciation business table to the depreciation business archive table; generate a depreciation business table creation statement according to the header fields corresponding to the depreciation business archive table, execute the depreciation business table creation statement, and generate the depreciation business table; migrate the business data in the depreciation business archive table that does not meet the archiving conditions to the depreciation business table; and summarize the business data in the depreciation business archive table according to the preset summary rules, and add it to the depreciation business table; At preset intervals, if a depreciation business archiving table exists and the depreciation business table meets the archiving conditions, the business data that meets the archiving conditions in the depreciation business table is summarized and added to the depreciation business archiving table according to the preset summary rules, and the business data that meets the archiving conditions in the depreciation business table is deleted; If there is no depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, rename the depreciation business sub-table to the depreciation business archiving sub-table; generate a depreciation business sub-table creation statement according to the header field corresponding to the depreciation business archiving sub-table, execute the depreciation business sub-table creation statement, and generate the depreciation business sub-table; migrate the business data in the depreciation business archiving sub-table that does not meet the archiving conditions to the depreciation business sub-table; and according to the preset summary rules, summarize the business data in the depreciation business archiving sub-table and add it to the depreciation business sub-table; At preset intervals, if there is a depreciation business archiving sub-table and the depreciation business sub-table meets the archiving conditions, the business data that meets the archiving conditions in the depreciation business sub-table is summarized and added to the depreciation business archiving sub-table according to the preset summary rules, and the business data that meets the archiving conditions in the depreciation business sub-table is deleted.

7. The depreciation processing method according to claim 1, characterized in that: After receiving the depreciation business operation request from the user, the depreciation business operation request is processed in the depreciation business table and the corresponding filing table corresponding to the unit to which the user belongs, or the depreciation business sub-table and the corresponding filing table, including: After receiving the user's depreciation business operation request, query the unit code set mapping sub-table to determine whether the unit to which the user belongs corresponds to the depreciation business table or the depreciation business sub-table; If the unit to which the user belongs corresponds to the depreciation business table, a database operation statement is generated according to the depreciation business operation request, and it is determined whether the application object of the depreciation business operation request is the depreciation business table or the depreciation business archive table, and the database operation statement is executed in the determined application object; If the unit to which the user belongs corresponds to the depreciation business sub-table, according to the depreciation business operation request, query the database operation statement corresponding to the depreciation business table, add the configuration expression of the depreciation business sub-table to the database operation statement corresponding to the depreciation business table, and obtain the database operation statement corresponding to the depreciation business sub-table; determine whether the application object of the depreciation business operation request is the depreciation business sub-table or the depreciation business archiving sub-table, and execute the database operation statement corresponding to the depreciation business sub-table in the determined application object.

8. A depreciation processing device, characterized in that: include: A module for determining units of tables to be divided, used to determine a first unit code set of units of tables to be divided when the depreciation business table meets the triggering condition; A unit code mapping information generating module, configured to generate unit code mapping information according to the first unit code set if the unit code in the first unit code set is not included in the unit code set mapping sub-table, wherein the unit code mapping information is used to identify a mapping relationship between each unit code and a corresponding depreciation business sub-table; A unit code set mapping sub-table adding module, used to add unit code mapping information corresponding to each unit code in the unit code set mapping sub-table; The depreciation business sub-table creation module is used to scan the header fields of the depreciation business table according to each unit code mapping information and create a depreciation business sub-table; Migration module, used to migrate business data in the depreciation business table to the depreciation business sub-table; A summary module is used to determine whether the depreciation business table and / or the depreciation business sub-table meet the archiving conditions at preset intervals, and if so, generate a depreciation business archiving table and / or a depreciation business archiving sub-table, wherein the depreciation business table and the depreciation business sub-table retain the summary data of the business data that meet the archiving conditions and the business data that do not meet the archiving conditions, and the depreciation business archiving table and the depreciation business archiving sub-table retain the business data that meet the archiving conditions; The request processing module is used to process the depreciation business operation request in the depreciation business table and depreciation business archive table, or the depreciation business sub-table and depreciation business archive sub-table corresponding to the unit to which the user belongs after receiving the depreciation business operation request from the user.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Assets depreciation computing management system and method

    CN101504755A

  • Method suitable for parallel computation of multi-currency asset depreciation of multiple assets

    CN101645158A

  • Business data migration method and related device

    CN113986879A

  • Depreciation calculation method and device, storage medium and computer equipment

    CN114282881A

  • Business data migration method, device and system

    CN116303361A