A method, device and medium for mapping association between administrative units and accounting units
Patent Information
- Application Number
- CN202410173770.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2044-02-07
AI Technical Summary
[0004]本发明实施例提供了一种行政单位与核算单位的映射关联方法、设备及介质,用于解决如下技术问题:目前的行政单位与核算单位的映射关联方式不能满足复杂的财务业务需求,灵活性较低,无法满足用户的使用需求
[0017]This invention proposes a method for implementing many-to-many mapping associations between administrative units and accounting units. For financial systems with different accounting ledgers under accounting units, it can simultaneously support two-level mapping associations between administrative units and accounting units, and between administrative units and accounting ledgers. It supports one-click query of the association relationship between administrative units and accounting units or accounting ledgers, meeting the different complex needs when delivering a single product to multiple customers, and improving the product's business processing capabilities and scalability.
Smart Images

Figure CN118093694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data mapping and processing technology, and in particular to a method, device and medium for mapping and associating administrative units and accounting units. Background Technology
[0002] Large-scale financial systems often contain two sets of units: administrative units and accounting units. These are usually linked one-to-one or independent. However, under complex business requirements, even a one-to-one mapping can be insufficient to meet actual business needs. Sometimes, administrative units need to correspond to multiple accounting units so that they can choose to use basic data such as personnel from accounting departments under multiple accounting units and flexibly choose which accounting unit to generate vouchers for, such as expense reports. Other times, multiple administrative units need to correspond to the same accounting unit to unify the accounting unit for voucher generation.
[0003] Therefore, the current mapping and association method between administrative units and accounting units cannot meet the needs of complex financial business, has low flexibility, and cannot meet the user's needs. Summary of the Invention
[0004] This invention provides a method, device, and medium for mapping and associating administrative units and accounting units, which addresses the following technical problem: the current mapping and association methods between administrative units and accounting units cannot meet the needs of complex financial transactions, have low flexibility, and fail to meet user requirements.
[0005] The embodiments of the present invention adopt the following technical solutions:
[0006] On one hand, embodiments of the present invention provide a mapping association method for administrative units and accounting units. The method includes: creating a corresponding mapping association table according to the mapping requirements of administrative units and accounting units; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship; creating a first data access interface for the business of administrative units for the mapping relationship table; creating a second data access interface for the business of accounting units for the mapping relationship table; and querying the many-to-many association data between administrative units and accounting units in the mapping relationship table through the first data access interface and / or the second data access interface.
[0007] In one feasible implementation, a corresponding mapping association table is created based on the mapping requirements between administrative units and accounting units. Specifically, this includes: creating a first mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting unit in the mapping requirements; and creating a second mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements. The accounting ledger includes a main ledger and subsidiary ledgers; each accounting unit contains one main accounting ledger and several subsidiary ledgers.
[0008] In one feasible implementation, after creating a second mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements, the method further includes: traversing the accounting ledgers in the second mapping association table to obtain the target accounting unit where the current accounting ledger is located; determining the range of administrative units associated with the target accounting unit in the first mapping association table; determining whether each administrative unit associated with the current accounting ledger is within the range of administrative units in the second mapping association table; if not, deleting the association between the current accounting ledger and the administrative unit in the second mapping association table.
[0009] In one feasible implementation, after creating a second mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements, the method further includes: if there is no association relationship for a certain accounting ledger in the second mapping association table, then all administrative units associated with the accounting unit to which the accounting ledger belongs are determined as the scope of administrative units that the accounting ledger can use.
[0010] In one feasible implementation, creating a first data access interface for the mapping relationship table for the business of administrative units specifically includes: creating the first data access interface for the business of using administrative units, and associating the first data access interface with the mapping relationship table so that the first data access interface can access the data in the mapping relationship table; wherein, the input parameters of the first data access interface support inputting multiple administrative unit names, and the returned results include detailed information on accounting units and accounting ledgers.
[0011] In one feasible implementation, a second data access interface for the mapping relationship table is created for the business of the accounting unit. Specifically, this includes: creating the second data access interface for the business using the accounting unit, and associating the second data access interface with the mapping relationship table so that the second data access interface can access the data in the mapping relationship table; wherein, the input parameters of the second data access interface support inputting a single accounting ledger, and the returned result is a complete SQL query statement or a list of corresponding administrative unit IDs.
[0012] In one feasible implementation, the association data query between administrative units and accounting units is performed through the first data access interface and / or the second data access interface. Specifically, this includes: querying the mapping association table through the first data access interface for accounting unit information or accounting ledger information associated with one or more administrative units; querying the mapping association table through the second data access interface for a list of IDs of administrative units associated with a single accounting ledger; or, obtaining an SQL query statement for querying administrative units associated with an accounting ledger through the second data access interface.
[0013] In one feasible implementation, the accounting unit information includes at least: mapping type, accounting unit number, and accounting unit name.
[0014] On the other hand, embodiments of the present invention also provide a mapping and association device for administrative units and accounting units. The device includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the following: creating a corresponding mapping and association table based on the mapping requirements of administrative units and accounting units; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship; creating a first data access interface for the business of administrative units in the mapping relationship table; creating a second data access interface for the business of accounting units in the mapping relationship table; and querying many-to-many association data between administrative units and accounting units in the mapping relationship table through the first data access interface and / or the second data access interface.
[0015] Finally, this embodiment of the invention also provides a storage medium, which is a non-volatile computer-readable storage medium storing at least one program. Each program includes instructions, which, when executed by a terminal, cause the terminal to perform the following: creating a corresponding mapping relationship table based on the mapping requirements of administrative units and accounting units; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship; creating a first data access interface for the mapping relationship table for the business of administrative units; creating a second data access interface for the mapping relationship table for the business of accounting units; and querying the many-to-many relationship data between administrative units and accounting units in the mapping relationship table through the first data access interface and / or the second data access interface.
[0016] Compared with the prior art, the mapping and association method, device and medium for administrative units and accounting units provided in this embodiment of the invention have the following beneficial effects:
[0017] This invention proposes a method for implementing many-to-many mapping associations between administrative units and accounting units. For financial systems with different accounting ledgers under accounting units, it can simultaneously support two-level mapping associations between administrative units and accounting units, and between administrative units and accounting ledgers. It supports one-click query of the association relationship between administrative units and accounting units or accounting ledgers, meeting the different complex needs when delivering a single product to multiple customers, and improving the product's business processing capabilities and scalability. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0019] Figure 1 A flowchart illustrating a mapping and association method between administrative units and accounting units provided in an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of an association mapping interface provided in an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of an accounting unit query interface provided in an embodiment of the present invention;
[0022] Figure 4 This is a schematic diagram of a mapping and association device structure between administrative units and accounting units provided in an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0024] This invention provides a method for mapping and associating administrative units with accounting units, such as... Figure 1 As shown, the mapping and association method between administrative units and accounting units specifically includes steps S101-S104:
[0025] S101. Based on the mapping requirements between administrative units and accounting units, create corresponding mapping relationship tables; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship.
[0026] First, in the financial system, administrative units and accounting units are two sets of units. Each accounting unit has multiple sets of accounting books, including one main account book and multiple auxiliary account books. The financial system actually uses the accounting books as the unit for voucher preparation.
[0027] After obtaining the many-to-many mapping requirements between administrative units and accounting units, a first mapping association table is created based on the specific many-to-many mapping relationship data between each administrative unit and each accounting unit as specified in the requirements. This first mapping association table is essentially an administrative unit-accounting unit mapping association table.
[0028] Furthermore, based on the specific many-to-many mapping relationship data between each administrative unit and each accounting ledger as specified in the requirements, a second mapping relationship table is created. This second mapping relationship table is essentially an administrative unit-accounting ledger mapping relationship table.
[0029] Further, the accounting books in the second mapping table are traversed to obtain the target accounting unit where the current accounting book is located. In the first mapping table, the range of administrative units associated with the target accounting unit is determined. Then, in the second mapping table, it is determined whether each administrative unit associated with the current accounting book is within the administrative unit range. If not, the association between the current accounting book and that administrative unit is deleted from the second mapping table.
[0030] As a feasible implementation method, since the present invention supports a two-level mapping between administrative units and accounting units and accounting ledgers, in order to ensure the accuracy of the mapping relationship, it is stipulated that the administrative units associated with the accounting ledgers can only belong to the scope of administrative units associated with the accounting units.
[0031] In one embodiment, if there are three administrative units associated with accounting book A in the second mapping table, namely administrative units a, b, and c, then first, the accounting unit A to which accounting book A belongs is obtained. Then, the associated administrative units of accounting unit A are obtained from the first mapping table. Assuming that the associated administrative units of accounting unit A are a, b, and d, it can be seen that administrative unit c associated with accounting book A is not within the scope of associated administrative units of accounting unit A. Therefore, the association between accounting book A and administrative unit c is deleted from the second mapping table to ensure that the administrative units associated with accounting book A can only belong to the scope of associated administrative units of accounting unit A.
[0032] As a possible implementation method, if there is no association relationship for a certain accounting book in the second mapping association table, then all administrative units associated with the accounting unit to which the accounting book belongs are determined as the scope of administrative units that the accounting book can use.
[0033] In one embodiment, if the second mapping relationship table does not specify any relationship between accounting book B and accounting unit B, then the accounting unit B to which accounting book B belongs is first obtained, and then the administrative units a and b associated with accounting unit B are obtained from the first mapping relationship table, thereby determining administrative units a and b as associated administrative units of accounting book B.
[0034] As a feasible implementation method, the present invention also provides an interface for adding mapping relationships. Figure 2 A schematic diagram of an association mapping interface provided in an embodiment of the present invention, such as... Figure 2 As shown, after creating the mapping association table, you can add new mapping relationships to the mapping association table through the add button in the unit mapping interface.
[0035] S102, the first data access interface for creating a mapping table for the business of administrative units.
[0036] Specifically, a first data access interface is created for the business operations of administrative units, and this first data access interface is associated with a mapping association table so that the first data access interface can access the data in the mapping association table. The first data access interface can accept multiple administrative unit names as input parameters, and the returned results include detailed information about the accounting unit and accounting ledgers.
[0037] As a feasible implementation method, in order to realize information query between multiple administrative units and multiple accounting units, or between multiple administrative units and multiple accounting ledgers, this invention provides a data access interface for using the business functions of administrative units. The input parameters of this interface support multiple administrative unit names, and the returned results include relevant detailed information of the corresponding accounting unit or accounting ledger, which can be used by the caller for data filtering.
[0038] S103, a second data access interface for creating a mapping table for the business of accounting units.
[0039] Specifically, a second data access interface is created for the business using the accounting unit, and the second data access interface is associated with a mapping association table so that the second data access interface can access the data in the mapping association table; wherein, the input parameters of the second data access interface support inputting a single accounting ledger, and the returned result is a complete SQL query statement or a list of corresponding administrative unit IDs.
[0040] As a feasible implementation method, in order to realize the query of the relationship between accounting ledgers, the present invention provides a data access interface for the business functions of accounting units. The input parameter of the interface is a single accounting ledger, and the returned result supports a complete SQL query statement or a list of specific IDs of the corresponding administrative units.
[0041] S104. Query the many-to-many relationship data between administrative units and accounting units in the mapping relationship table through the first data access interface and / or the second data access interface.
[0042] Specifically, through the first data access interface, one can query the accounting unit information or accounting ledger information associated with one or more administrative units in the mapping association table. Through the second data access interface, one can query the list of IDs of administrative units associated with a single accounting ledger in the mapping association table; or, through the second data access interface, one can obtain the SQL query statement used to query the administrative units associated with the accounting ledger.
[0043] Furthermore, the first data access interface enables one-click querying of the relationships between administrative units and their associated accounting units and / or accounting books. Figure 3 This is a schematic diagram of an accounting unit query interface provided in an embodiment of the present invention, such as... Figure 3 As shown, the retrieved accounting unit information includes at least: mapping type, accounting unit number, and accounting unit name. The retrieved accounting ledger information includes at least: accounting ledger number and accounting ledger name.
[0044] As a feasible implementation method, when it is necessary to query the associated accounting units and accounting books of one or more administrative units, the name of the administrative unit to be queried is entered into the first data access interface. This interface will, based on the input parameter value, search for the associated accounting units in the first mapping association table and the associated accounting books in the second mapping association table, and then return the search results and display them in the user interface for the user to view. When a user queries the administrative units associated with a specific accounting book, the name of that accounting book is entered into the second data access interface. This interface will, based on the name of the accounting book, search for the associated administrative units in the second mapping association table, retrieve the IDs of these administrative units, and display them in a list format in the user interface.
[0045] In addition, embodiments of the present invention also provide a mapping and association device for administrative units and accounting units, such as... Figure 4 As shown, the mapping and association devices between administrative units and accounting units specifically include:
[0046] At least one processor; and a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by at least one processor, so that at least one processor can perform the following:
[0048] Based on the mapping requirements between administrative units and accounting units, a corresponding mapping relationship table is created; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship;
[0049] The first data access interface for creating the mapping relationship table for the administrative unit's business;
[0050] A second data access interface is created for the mapping table of the accounting unit's business;
[0051] Through the first data access interface and / or the second data access interface, query the many-to-many relationship data between administrative units and accounting units in the mapping relationship table.
[0052] Finally, this embodiment of the invention also provides a storage medium, which is a non-volatile computer-readable storage medium storing at least one program, each program including instructions, which, when executed by a terminal, cause the terminal to perform:
[0053] Based on the mapping requirements between administrative units and accounting units, a corresponding mapping relationship table is created; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship;
[0054] The first data access interface for creating the mapping relationship table for the administrative unit's business;
[0055] A second data access interface is created for the mapping table of the accounting unit's business;
[0056] Through the first data access interface and / or the second data access interface, query the many-to-many relationship data between administrative units and accounting units in the mapping relationship table.
[0057] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0058] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0059] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0060] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0061] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0062] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0063] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0064] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0065] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0066] The foregoing has described specific embodiments of the present invention. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0067] The above description is merely an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for mapping association of administrative units with accounting units, characterized in that, The method includes: Based on the mapping requirements between administrative units and accounting units, a corresponding mapping relationship table is created; wherein the mapping relationship in the mapping relationship table is a many-to-many mapping relationship; specifically including: Based on the many-to-many mapping relationship data between each administrative unit and each accounting unit in the mapping requirements, create a first mapping association table; Based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements, a second mapping association table is created; wherein, the accounting ledger includes a main ledger and subsidiary ledgers; an accounting unit contains one set of main accounting ledgers and several sets of subsidiary ledgers; The first data access interface for creating the mapping relationship table for the administrative unit's business; A second data access interface is created for the mapping table of the accounting unit's business; Through the first data access interface and / or the second data access interface, query the many-to-many relationship data between administrative units and accounting units in the mapping relationship table.
2. The method for mapping association between administrative units and accounting units according to claim 1, wherein, After creating a second mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements, the method further includes: Traverse the accounting ledgers in the second mapping table to obtain the target accounting unit where the current accounting ledger is located; In the first mapping association table, the scope of administrative units associated with the target accounting unit is determined; In the second mapping table, it is determined whether each administrative unit associated with the current accounting ledger is within the scope of the administrative unit; If not, then delete the association between the current accounting ledger and the administrative unit in the second mapping table.
3. The method for mapping administrative units to accounting units according to claim 1, wherein, After creating a second mapping association table based on the many-to-many mapping relationship data between each administrative unit and each accounting ledger in the mapping requirements, the method further includes: If there is no association relationship for a certain accounting book in the second mapping association table, then all administrative units associated with the accounting unit to which the accounting book belongs are determined as the scope of administrative units that the accounting book can use.
4. The method for mapping administrative units to accounting units according to claim 1, wherein, The first data access interface for creating the mapping relationship table for the administrative unit's business operations specifically includes: The first data access interface is created for the use of administrative units' business, and the first data access interface is associated with the mapping association table so that the first data access interface can access the data in the mapping association table; The first data access interface supports inputting multiple administrative unit names as input parameters, and the returned results include detailed information about the accounting unit and accounting ledger.
5. The mapping and association method between administrative units and accounting units according to claim 1, characterized in that, The second data access interface for creating the mapping relationship table for the accounting unit's business includes: The second data access interface is created for the business using the accounting unit, and the second data access interface is associated with the mapping association table so that the second data access interface can access the data in the mapping association table; The second data access interface supports inputting a single accounting ledger as input parameters, and returns a complete SQL query statement or a list of corresponding administrative unit IDs.
6. The mapping and association method between administrative units and accounting units according to claim 1, characterized in that, Through the first data access interface and / or the second data access interface, the associated data query between administrative units and accounting units is performed, specifically including: Through the first data access interface, query the mapping association table for accounting unit information or accounting ledger information associated with one or more administrative units; Through the second data access interface, query the mapping association table for a list of administrative unit IDs associated with a single accounting ledger; or, The second data access interface is used to obtain the SQL query statement for querying the administrative units associated with the accounting books.
7. The mapping and association method between administrative units and accounting units according to claim 6, characterized in that, The accounting unit information includes at least: mapping type, accounting unit number, and accounting unit name.
8. A mapping and association device between administrative units and accounting units, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, enabling the at least one processor to execute a mapping association method for administrative units and accounting units according to any one of claims 1-7.
9. A storage medium, characterized in that, The storage medium is a non-volatile computer-readable storage medium that stores at least one program, each program including instructions that, when executed by a terminal, cause the terminal to perform a mapping association method for administrative units and accounting units according to any one of claims 1-7.
Citation Information
Patent Citations
Method for mapping associated object to relationship
CN111797278A
Data authority control method and system based on grouping
CN116049882A