An institutional report generation method, device, equipment and medium

By introducing Zookeeper components and the WATCHER mechanism into the financial system, data changes are automatically monitored and related nodes are updated, solving the problem of low efficiency in generating institutional reports in existing technologies and achieving efficient report data storage and rapid generation.

CN116521678BActive Publication Date: 2025-10-21BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310444340.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2025-10-21
Estimated Expiration
2043-04-23

AI Technical Summary

Technical Problem

Existing technologies require multiple processing and aggregation of business data stored in the database when generating organizational reports, resulting in complex storage space usage, wasted computing power, and the inability to automatically trigger data re-aggregation, thus affecting report generation efficiency.

Method used

The Zookeeper component is used as middleware to store basic business data in a tree structure and the WATCHER mechanism is used to monitor data changes, automatically trigger data updates of related nodes, and generate organizational reports.

Benefits of technology

It enables efficient storage and rapid retrieval of institutional report data, reduces computation time, improves report generation efficiency, and supports efficient reporting operations for financial institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521678B_ABST
    Figure CN116521678B_ABST
Patent Text Reader

Abstract

The application provides a method and device for generating an institution report, an equipment and a medium, which can be applied in the distributed field or the financial field, and comprises the following steps: obtaining basic business data; writing the basic business data into a to-be-written leaf node in Zookeeper, the to-be-written leaf node being a leaf node in Zookeeper mapped by the transaction-related institution; in response to the WATCHER of the to-be-written leaf node being triggered, changing the data of the related leaf node according to the basic business data; and generating an institution report by using the data obtained by analyzing a plurality of leaf nodes of the Zookeeper. By introducing Zookeeper as a middleware, the change of data can be monitored in time, and the data can be dynamically updated. In this way, when the institution report is generated, the data of the leaf node can be directly accessed to obtain the report, without too much calculation, so that the time consumption is short, and the efficiency of report generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of distributed or financial technology, and in particular to a method and device for generating institutional reports. Background Art

[0002] Most financial industry reporting businesses are statistically analyzed on an institutional basis. That is, the basic data is provided by the underlying handling institutions, and the upper or higher-level institutions summarize and aggregate the business data of the lower-level institutions, layer by layer, and finally form the reporting data of the overall business topology.

[0003] During the implementation process, business data stored in the database needed to be processed and written to temporary tables. When writing business report data from various organizations to temporary tables, different intermediate tables were required for different types of reports, increasing storage space usage and complicating storage logic. Furthermore, modifications to underlying business data failed to automatically trigger data reaggregation and reprocessing. Furthermore, the aggregation and processing of underlying data resulted in repeated calculations, wasting system computing power. Each processing step was time-consuming, impacting report generation efficiency.

[0004] Therefore, how to provide an efficient method for generating institutional reports is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a method and apparatus for generating an organization report, aiming to efficiently generate an organization report.

[0006] In a first aspect, an embodiment of the present application provides a method for generating an organization report, comprising:

[0007] Obtaining basic business data, including transaction data and transaction-related institutions;

[0008] Writing the basic business data into a leaf node to be written in Zookeeper, where the leaf node to be written is a leaf node mapped by the transaction association in Zookeeper, and a watcher for monitoring data changes is provided on the leaf node to be written;

[0009] In response to the WATCHER of the leaf node to be written being triggered, changing the data of the associated leaf node according to the basic business data, the associated leaf node being the leaf node associated with the leaf node to be written;

[0010] An organization report is generated using data obtained by parsing multiple leaf nodes of the Zookeeper.

[0011] Optionally, writing the basic business data into a leaf node to be written in Zookeeper includes:

[0012] Obtain a predefined node tree in Zookeeper, wherein the node tree is mapped to an organization tree, and the organization tree includes multiple organizations;

[0013] According to the basic business data, a leaf node to be written is obtained, where the leaf node to be written is a leaf node in the node tree mapped by the transaction-related institution;

[0014] The basic business data is written into the leaf node to be written using JSON format.

[0015] Optionally, writing the basic business data into a leaf node to be written in Zookeeper includes:

[0016] Set up a timing trigger mechanism;

[0017] Based on the timing trigger mechanism, the basic business data is written into the leaf node to be written in Zookeeper on a regular basis.

[0018] Optionally, changing the data of the associated leaf node based on the basic business data includes:

[0019] Obtaining a node associated with the node to be written in the node tree as a first associated leaf node;

[0020] Aggregating the basic business data with the data in the first associated leaf node to obtain first updated data;

[0021] Using the first update data, updating the data in the first associated leaf node;

[0022] Obtaining a node associated with the first associated leaf node in the node tree as a second associated leaf node;

[0023] Aggregating the first updated data with the data in the second associated leaf node to obtain second updated data;

[0024] The data in the second associated leaf node is updated using the second updated data.

[0025] Optionally, generating an organization report by parsing the data obtained from the multiple leaf nodes of the Zookeeper includes:

[0026] Read the JSON data in multiple leaf nodes of the Zookeeper;

[0027] Parsing the JSON data in the multiple leaf nodes to obtain report types and values ​​corresponding to the report types;

[0028] Generate an organization report using the report type and the value corresponding to the report type.

[0029] In a second aspect, an embodiment of the present application provides an organization report generation device, comprising:

[0030] An acquisition module, configured to acquire basic business data, including transaction data and transaction-related institutions;

[0031] A writing module, configured to write the basic business data into a leaf node to be written in Zookeeper, wherein the leaf node to be written is a leaf node mapped by the transaction association in Zookeeper, and the leaf node to be written is provided with a watcher for monitoring data changes;

[0032] a change module, configured to, in response to the WATCHER of the leaf node to be written being triggered, change the data of the associated leaf node according to the basic business data, wherein the associated leaf node is a leaf node associated with the leaf node to be written;

[0033] The report module is used to generate an organizational report using data obtained by parsing multiple leaf nodes of the Zookeeper.

[0034] Optionally, the writing module includes:

[0035] A node tree acquisition unit is used to acquire a node tree predefined in Zookeeper, wherein the node tree is mapped to an organization tree, and the organization tree includes multiple organizations;

[0036] A to-be-written node acquisition unit is configured to acquire a to-be-written leaf node according to the basic business data, wherein the to-be-written leaf node is a leaf node in the node tree mapped by the transaction association institution;

[0037] The writing unit is used to write the basic business data into the leaf node to be written in JSON format.

[0038] Optionally, the change module includes:

[0039] A first associated node acquisition unit, configured to acquire a node associated with the node to be written in the node tree as a first associated leaf node;

[0040] A first data update unit, configured to aggregate the basic business data with the data in the first associated leaf node to obtain first updated data;

[0041] a first updating unit, configured to update the data in the first associated leaf node using the first update data;

[0042] A second associated node acquisition unit, configured to acquire a node associated with the first associated leaf node in the node tree as a second associated leaf node;

[0043] a second update data unit, configured to aggregate the first update data with the data in the second associated leaf node to obtain second update data;

[0044] The second updating unit is used to update the data in the second associated leaf node using the second update data.

[0045] In a third aspect, an embodiment of the present application provides a device comprising a memory and a processor, wherein the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the institutional report generation method described in any one of the first aspects above.

[0046] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, the device executing the code implements the method for generating an institutional report as described in any one of the first aspects above.

[0047] The embodiment of the present application provides a method, apparatus, device and medium for generating an institution report. When executing the method, basic business data is first obtained, and the basic business data includes transaction data and transaction-related institutions; then the basic business data is written into a leaf node to be written in Zookeeper, and the leaf node to be written is a leaf node of the transaction-related institution mapped in Zookeeper, and the leaf node to be written is provided with a watcher for monitoring data changes; then, in response to the watcher of the leaf node to be written being triggered, the data of the associated leaf node is changed according to the basic business data, and the associated leaf node is a leaf node associated with the leaf node to be written; finally, the institution report is generated using the data obtained by parsing multiple leaf nodes of Zookeeper. Utilizing the tree structure characteristics of Zookeeper, by logically converting the bank institution tree into a file tree of Zookeeper, and storing the institution-related report data in the corresponding node of Zookeeper, efficient storage of bank report data is achieved. Since the Zookeeper data is stored in memory, fast retrieval can be achieved. In this way, when generating institutional reports, you can directly access the data of the leaf nodes to obtain the reports without excessive calculations and in a shorter time, which improves the efficiency of report generation and provides efficient system support for the reporting business of financial institutions. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 An architectural diagram of the method for generating an organization report provided in an embodiment of the present application;

[0050] Figure 2 A flow chart of a method for generating an organization report provided in an embodiment of the present application;

[0051] Figure 3 Another method flow chart of the method for generating an organization report provided in an embodiment of the present application;

[0052] Figure 4 A structural diagram of the organization report generation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The reporting business of financial institutions usually involves statistics on the underlying handling agencies, and aggregation based on this data, which is recursively passed down layer by layer to form reporting data for higher-level and higher-level agencies, ultimately generating an overall reporting information set.

[0054] Existing methods require processing business data stored in the database, writing it to temporary tables based on organizational information, and then writing the business data for the corresponding organizations separately. This approach requires writing business report data for each level of organization into temporary tables, and different types of reports require the creation of separate intermediate tables. This increases storage space usage and complicates storage logic. Furthermore, modifications to the underlying business data prevent automatic data reaggregation and reprocessing.

[0055] The front-end page then displays or reprocesses the report data by reading from the temporary table. When the front-end needs to display report data, it directly queries the underlying data stored in the database, aggregates and filters the data within the application, and forms a complete set of organizational-level business data. Aggregating and processing the underlying data within the application each time involves repeated calculations, wasting system computing power and taking a long time, impacting query efficiency.

[0056] The method provided in the embodiment of the present application is executed by a computer device and is used to efficiently generate organizational reports.

[0057] It should be noted that the method, apparatus, device, and medium for generating an institutional report provided by the present invention can be used in the distributed field or the financial field. The above is only an example and does not limit the application field of the method, apparatus, device, and medium for generating an institutional report provided by the present invention.

[0058] Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0059] See also Figure 1 , Figure 1 An architectural diagram of the organizational report generation method provided in an embodiment of this application. Existing solutions typically consist of only two modules: an application and a database. The database stores the basic report data or processed report data, while the application writes the basic data, processes it into intermediate tables, and reads the data for report presentation. All operations and data flows revolve around these two modules.

[0060] In this embodiment, the Zookeeper component is introduced, forming a proxy layer between the application and the database. Data is written to the Zookeeper component in the form of a structured tree. Furthermore, the Watcher mechanism ensures that modifications to underlying data trigger the reaggregation and reprocessing of upper and higher-level data. Introducing the Zookeeper component between the application and the database decouples data storage from data display, providing excellent system scalability and facilitating subsequent business expansion. For example, to add a new type of report statistics, simply add the access logic for that report data in Zookeeper.

[0061] At this time, the application is responsible for producing basic business data, monitoring and processing Zookeeper data changes, processing or displaying report data, etc.; the data storage module is responsible for storing basic business data and providing a data foundation for Zookeeper data production; the Zookeeper module stores report data and serves as an intermediate layer between the application and the data storage module.

[0062] See also Figure 2 , Figure 2 A method flow chart of a method for generating an organization report provided in an embodiment of the present application includes:

[0063] Step S201: Obtain basic business data.

[0064] The structure of basic business data is coupled to business functions and is written when business functions are triggered. Business functions include various financial transactions, such as loans, deposits, and loan disbursements. When a business function occurs, the corresponding basic business data is written. Basic business data includes transaction data and transaction-related institutions. Transaction data includes, but is not limited to, the serial number, collateral number, collateral amount, registration time, and loan status. The transaction-related institution is represented by the serial number of the agency handling the transaction, which identifies the institution associated with the business and also the agency handling the collateral. Therefore, transaction data can be written to the corresponding institution range based on the transaction-related institution.

[0065] Step S202: writing the basic business data into the leaf node to be written in Zookeeper.

[0066] Zookeeper is a distributed coordination framework that uses tree nodes to organize data and store it in memory. Based on the wait-free feature and FIFO request queue, it provides centralized management for its leaf nodes and provides efficient read and write performance.

[0067] Since the basic business data includes transaction-related organizations, when writing the basic business data into a leaf node, the basic business data may be written into a leaf node corresponding to the transaction-related organization of the basic business data in Zookeeper.

[0068] Step S203: In response to the WATCHER to be written into the leaf node being triggered, the data of the associated leaf node is changed according to the basic business data.

[0069] The Zookeeper architecture's Watcher mechanism automatically notifies other front-end applications when report data changes, allowing them to modify or reprocess the report results. Each leaf node is equipped with a watcher to monitor data changes. When data on a leaf node changes, its corresponding watcher is triggered. The Watcher mechanism is an implementation of the Observer pattern, decoupling data changes from application monitoring.

[0070] Because of ZooKeeper's distributed nature, one leader node can write while other follower or observer nodes can read, making it ideally suited to the read-heavy, write-scarce nature of reporting systems. When a leaf node changes, all its associated leaf nodes also change, eliminating manual configuration time and ensuring reliability and consistency. For example, ZooKeeper includes a bank branch, linked to branch a, which is linked to branch A, which is linked to head office I. If a change occurs at bank branch 1, its associated branches a, branch A, and head office I will all change in turn.

[0071] When the watcher for a leaf node to be written is triggered, the leaf node associated with the leaf node to be written can be obtained, and the data of the associated leaf node can be modified based on the relationship between the transaction data. This achieves loose coupling between the application and data storage, basic business data and report data, and facilitates the expansion of new reporting services. It should be noted that in order to ensure that the data of the associated leaf node can be successfully updated, it is necessary to pre-define the processing logic for the relationship between each node.

[0072] Step S204: Generate an organizational report using the data obtained by parsing the multiple leaf nodes of the Zookeeper.

[0073] Through the above steps, Zookeeper's multiple leaf nodes only retain the final result value of each report type, which reduces memory usage and improves storage efficiency. By directly accessing Zookeeper node data, the report data of a certain organization can be queried with a time complexity of O(1), which can achieve fast retrieval. Therefore, by parsing the data obtained from the multiple leaf nodes of Zookeeper, the data value of the organization corresponding to each leaf node can be obtained, and then based on this, the organization report can be generated, which fully improves the efficiency of generating organization reports.

[0074] In summary, this embodiment introduces Zookeeper as middleware, which can monitor data changes in a timely manner and dynamically update the data. This allows direct access to leaf node data when generating organizational reports, eliminating the need for excessive calculations and reducing processing time, thereby improving report generation efficiency.

[0075] In the embodiment of the present application, the above Figure 2 There are many possible implementations of the steps, which are described below. It should be noted that the implementations given in the following description are only for illustrative purposes and do not represent all implementations of the embodiments of the present application.

[0076] See also Figure 3, which is another method flow chart of the method for generating an organization report provided in an embodiment of the present application, including:

[0077] Step S301: Obtain basic business data.

[0078] Step S302: Setting a timing trigger mechanism.

[0079] The timing trigger mechanism is used to trigger the writing of basic business data into Zookeeper at a scheduled time, so that the data triggered by business functions to write to the database can be written to Zookeeper for storage in a timely manner, so as to trigger subsequent steps according to the frequency of data writing, avoid excessive waste of computing resources, and ensure real-time data update.

[0080] Step S303: Based on the timing trigger mechanism, regularly execute the step of writing the basic business data into the leaf nodes to be written in Zookeeper.

[0081] As a possible implementation method, you can first obtain a predefined node tree in Zookeeper, and the node tree is mapped to the organization tree, and the organization tree includes multiple organizations; then, based on the basic business data, obtain the leaf node to be written, and the leaf node to be written is the leaf node in the node tree mapped by the transaction-related organization; finally, use JSON format to write the basic business data into the leaf node to be written.

[0082] The predefined node tree can be logically mapped to an institution's organizational tree. For example, for the Bank of China, the root node ' / Bank of China / ' (corresponding to the Level 0 bank, the Bank of China Head Office) is established, with ' / .. / Beijing Branch / ', ' / .. / Shanghai Branch / ', and ' / .. / Shenzhen Branch / ' as child nodes (corresponding to the Level 1 banks, the Bank of China's provincial branches). This process is then repeated, gradually expanding the child nodes as the hierarchy descends, ultimately ending with Level 4 institutions (handling agencies) as leaf nodes.

[0083] The leaf node to be written is the leaf node corresponding to the institution reflected by the basic business data on the node tree. When writing the basic business data to the leaf node to be written, the JSON format can be used. The JSON format is: {TYPE1:VALUE1,TYPE2:VALUE2...}. Among them, TYPE1 and TYPE2 respectively identify different report types, and VALUE1 and VALUE2 are the values ​​of different reports. For example, {GUARANTEE_COUNT:10,GUARANTEE_AMOUNT:10000000} means that there are 10 transactions with mortgage collateral under the institution, and the total amount is 10000000.

[0084] It should be noted that using the JSON format can make data storage occupy less memory.

[0085] Step S304: In response to the WATCHER of the leaf node to be written being triggered, a node associated with the node to be written in the node tree is obtained as a first associated leaf node.

[0086] After receiving a WATCHER event, the event is processed, the data from the leaf nodes in Zookeeper is aggregated, and written to the upper and upper nodes. The first associated leaf node is the node directly connected to the node to be written. For example, if Zookeeper includes 1 bank branch, 1 bank branch is associated with branch a, branch a is associated with branch A, and branch A is associated with head office I, then the first associated leaf node of bank branch 1 is branch a.

[0087] Step S305: Aggregate the basic business data with the data in the first associated leaf node to obtain first updated data.

[0088] The specific writing process can be based on the data in the leaf node to be written, aggregated and processed with the basic business data, and then the result is written to the leaf node to be written. For example, the data value in the first associated leaf node is (0001, B0001, G0001, 10000.00, 2020-09-01, completed), and the basic business data is (0003, B0001, G0003, 50000.00, 2011-04-11, under review). Then the first update data written to the first associated leaf node B0001 is represented in JSON format as {GUARANTEE_COUNT:2, GUARANTEE_AMOUNT:60000.00}, indicating that the institution and its subsidiaries have two mortgage collaterals with a total mortgage amount of 60,000.

[0089] Step S306: Use the first update data to update the data in the first associated leaf node.

[0090] In order to reduce the amount of data, only the final updated data is saved in the first associated leaf node, which also reduces the workload when querying the data and generating organizational reports in the future.

[0091] Step S307: Obtain a node in the node tree that is associated with the first associated leaf node as a second associated leaf node.

[0092] The second associated leaf node is the node directly connected to the first associated leaf node. For example, if Zookeeper includes 1 bank branch, 1 bank branch is associated with branch a, branch a is associated with branch A, and branch A is associated with head office I, then if the first associated leaf node is branch a, the second associated leaf node is branch A.

[0093] Step S308: Aggregate the first updated data with the data in the second associated leaf node to obtain second updated data.

[0094] The aggregation process of this step is similar to step S304 and will not be described in detail here. The first updated data is used as the base, and after aggregation and processing with the data in the second associated leaf node, the result is written into the second associated leaf node.

[0095] Step S309: Use the second updated data to update the data in the second associated leaf node.

[0096] The aggregation process in this step is similar to that in step S305 and will not be described again here.

[0097] Step S310: Generate an organizational report using data obtained by parsing multiple leaf nodes of the Zookeeper.

[0098] As a possible implementation method, the JSON data in the multiple leaf nodes of the Zookeeper can be read first; then the JSON data in the multiple leaf nodes can be parsed to obtain the report type and the value corresponding to the report type; finally, the report type and the value corresponding to the report type can be used to generate an organization report. After the above processing, each leaf node can represent an organization, and the data in each leaf node is the final value. Therefore, the report value of each organization can be quickly queried and a report can be generated quickly, which reduces the amount of calculation for querying data from the background and improves the generation efficiency.

[0099] In summary, this embodiment ensures timely data updates by setting a timed trigger mechanism; realizes rapid data retrieval by predefining a node tree that is mapped to the organization tree; updates data step by step through the watcher mechanism; and improves the efficiency of report generation by introducing Zookeeper as the middleware.

[0100] The above are some specific implementations of the method for generating an organization report provided in the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided in the embodiment of the present application will be introduced from the perspective of functional modularization.

[0101] See also Figure 4 The schematic diagram of the structure of the organization report generation device shown in FIG. 1 includes:

[0102] An acquisition module 401 is used to acquire basic business data, including transaction data and transaction-related institutions;

[0103] A writing module 402 is configured to write the basic business data into a leaf node to be written in Zookeeper, where the leaf node to be written is a leaf node mapped by the transaction association in Zookeeper, and a watcher is provided on the leaf node to monitor data changes.

[0104] A changing module 403 is configured to change data of an associated leaf node in response to the WATCHER of the leaf node to be written being triggered, according to the basic business data, where the associated leaf node is a leaf node associated with the leaf node to be written;

[0105] The report module 404 is used to generate an organizational report using data obtained by parsing multiple leaf nodes of the Zookeeper.

[0106] As a possible implementation, the writing module 402 includes:

[0107] A node tree acquisition unit is used to acquire a node tree predefined in Zookeeper, wherein the node tree is mapped to an organization tree, and the organization tree includes multiple organizations;

[0108] A to-be-written node acquisition unit is configured to acquire a to-be-written leaf node according to the basic business data, wherein the to-be-written leaf node is a leaf node in the node tree mapped by the transaction association institution;

[0109] The writing unit is used to write the basic business data into the leaf node to be written in JSON format.

[0110] As a possible implementation, the writing module 402 includes:

[0111] Timing unit, used to set the timing trigger mechanism;

[0112] A periodic execution unit is used to periodically execute the writing of the basic business data into the leaf node to be written in Zookeeper based on the timing trigger mechanism.

[0113] As a possible implementation, the changing module 403 includes:

[0114] A first associated node acquisition unit, configured to acquire a node associated with the node to be written in the node tree as a first associated leaf node;

[0115] A first data update unit, configured to aggregate the basic business data with the data in the first associated leaf node to obtain first updated data;

[0116] a first updating unit, configured to update the data in the first associated leaf node using the first update data;

[0117] A second associated node acquisition unit, configured to acquire a node associated with the first associated leaf node in the node tree as a second associated leaf node;

[0118] a second update data unit, configured to aggregate the first update data with the data in the second associated leaf node to obtain second update data;

[0119] The second updating unit is used to update the data in the second associated leaf node using the second update data.

[0120] As a possible implementation, the report module 404 includes:

[0121] A reading unit, configured to read JSON data from multiple leaf nodes of the Zookeeper;

[0122] A parsing unit, configured to parse the JSON data in the plurality of leaf nodes to obtain a report type and a value corresponding to the report type;

[0123] The report generation unit is used to generate an organization report using the report type and the value corresponding to the report type.

[0124] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0125] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the institutional report generation method described in any embodiment of the present application.

[0126] The computer storage medium stores code, and when the code is executed, the device executing the code implements the method for generating an institutional report as described in any embodiment of the present application.

[0127] The "first" and "second" (if any) in the names mentioned in the embodiments of this application are only used as name identifiers and do not represent the first or second in order.

[0128] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment or certain parts of the embodiments of the present application.

[0129] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those of ordinary skill in the art can understand and implement it without paying any creative work.

[0130] The above description is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application.

Claims

1. A method for generating an organization report, characterized in that: The method comprises: Obtaining basic business data, including transaction data and transaction-related institutions; Writing the basic business data into a leaf node to be written in Zookeeper, where the leaf node to be written is a leaf node mapped by the transaction association in Zookeeper, and a watcher for monitoring data changes is provided on the leaf node to be written; In response to the WATCHER of the leaf node to be written being triggered, changing the data of the associated leaf node according to the basic business data, the associated leaf node being the leaf node associated with the leaf node to be written; Generate an organization report using data obtained by parsing multiple leaf nodes of the Zookeeper; Writing the basic business data into the leaf node to be written in Zookeeper includes: Obtain a predefined node tree in Zookeeper, wherein the node tree is mapped to an organization tree, and the organization tree includes multiple organizations; According to the basic business data, a leaf node to be written is obtained, where the leaf node to be written is a leaf node in the node tree mapped by the transaction-related institution; The basic business data is written into the leaf node to be written using JSON format.

2. The method according to claim 1, characterized in that Writing the basic business data into the leaf node to be written in Zookeeper includes: Set up a timing trigger mechanism; Based on the timing trigger mechanism, the basic business data is written into the leaf node to be written in Zookeeper on a regular basis.

3. The method according to claim 1, characterized in that The step of changing the data of the associated leaf node according to the basic business data includes: Obtaining a node in the node tree that is associated with the leaf node to be written as a first associated leaf node; Aggregating the basic business data with the data in the first associated leaf node to obtain first updated data; Using the first update data, updating the data in the first associated leaf node; Obtaining a node associated with the first associated leaf node in the node tree as a second associated leaf node; Aggregating the first updated data with the data in the second associated leaf node to obtain second updated data; The data in the second associated leaf node is updated using the second updated data.

4. The method according to claim 1, wherein The data obtained by parsing the multiple leaf nodes of the Zookeeper is used to generate an organizational report, including: Read the JSON data in multiple leaf nodes of the Zookeeper; Parsing the JSON data in the multiple leaf nodes to obtain report types and values ​​corresponding to the report types; Generate an organization report using the report type and the value corresponding to the report type.

5. An organization report generation device, characterized in that: The device comprises: An acquisition module, configured to acquire basic business data, including transaction data and transaction-related institutions; A writing module, configured to write the basic business data into a leaf node to be written in Zookeeper, wherein the leaf node to be written is a leaf node mapped by the transaction association in Zookeeper, and the leaf node to be written is provided with a watcher for monitoring data changes; a change module, configured to, in response to the WATCHER of the leaf node to be written being triggered, change the data of the associated leaf node according to the basic business data, wherein the associated leaf node is a leaf node associated with the leaf node to be written; A reporting module, configured to generate an organizational report using data obtained by parsing multiple leaf nodes of the Zookeeper; The writing module includes: A node tree acquisition unit is used to acquire a node tree predefined in Zookeeper, wherein the node tree is mapped to an organization tree, and the organization tree includes multiple organizations; A to-be-written node acquisition unit is configured to acquire a to-be-written leaf node according to the basic business data, wherein the to-be-written leaf node is a leaf node in the node tree mapped by the transaction association institution; The writing unit is used to write the basic business data into the leaf node to be written in JSON format.

6. The device according to claim 5, characterized in that The change module includes: A first associated node acquisition unit, configured to acquire a node in the node tree that is associated with the leaf node to be written as a first associated leaf node; A first data update unit, configured to aggregate the basic business data with the data in the first associated leaf node to obtain first updated data; a first updating unit, configured to update the data in the first associated leaf node using the first update data; A second associated node acquisition unit, configured to acquire a node associated with the first associated leaf node in the node tree as a second associated leaf node; a second update data unit, configured to aggregate the first update data with the data in the second associated leaf node to obtain second update data; The second updating unit is used to update the data in the second associated leaf node using the second update data.

7. A device, characterized in that The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes, so that the device executes the institutional report generation method according to any one of claims 1 to 4.

8. A computer storage medium, characterized in that The computer storage medium stores codes. When the codes are executed, the computer storage device executing the codes implements the method for generating an institutional report according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Distributed scheduling method and system based on zookeeper biplanar data architecture

    CN105187499A

  • Quota updating method, device and equipment and computer readable storage medium

    CN112396514A