CN114647671A - Data query method, data query device, electronic equipment, storage medium and program product - Google Patents

Data query method, data query device, electronic equipment, storage medium and program product Download PDF

Info

Publication number
CN114647671A
CN114647671A CN202210271146.4A CN202210271146A CN114647671A CN 114647671 A CN114647671 A CN 114647671A CN 202210271146 A CN202210271146 A CN 202210271146A CN 114647671 A CN114647671 A CN 114647671A
Authority
CN
China
Prior art keywords
target
data
accounting
monthly
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210271146.4A
Other languages
Chinese (zh)
Inventor
曾圣韬
吴观宇
陈科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210271146.4A priority Critical patent/CN114647671A/en
Publication of CN114647671A publication Critical patent/CN114647671A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/125Finance or payroll

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application relates to the field of data processing, and provides a data query method, a data query device, electronic equipment, a storage medium and a program product. The method is applied to a financial management system, a database of the financial management system stores a monthly statement, the monthly statement comprises a plurality of pieces of data of at least one economic organization, and each piece of data is used for recording monthly settlement data of an accounting subject of one economic organization in at least one month. The method comprises the following steps: receiving an acquisition request of a target financial statement of a user, wherein the acquisition request comprises: identification of the target financial statement; determining the identifiers of N target accounting subjects required by generating the target financial statement according to the identifier of the target financial statement; reading monthly settlement data of each target accounting subject from a monthly settlement table of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject; generating a target financial statement according to the monthly data of each target accounting department; and outputting the target financial statement.

Description

Data query method, data query device, electronic equipment, storage medium and program product
Technical Field
The present application relates to data processing technologies, and in particular, to a data query method, apparatus, electronic device, storage medium, and program product.
Background
Currently, economic organizations are arranged in most rural areas to promote the economic development of the rural areas. In order to manage the three resources (capital, assets and resources) corresponding to the economic organization owned by each rural area conveniently, research and development personnel develop a three-resource financial management system. The system can acquire and output the financial statement to be checked by the user according to the user requirement.
However, the existing three-asset management system has the problem of low financial statement output efficiency.
Disclosure of Invention
The application provides a data query method, a data query device, electronic equipment, a storage medium and a program product, which are used for improving the output efficiency of financial statements.
In a first aspect, the present application provides a data query method, which is applied to a financial management system, wherein a database of the financial management system stores a monthly statement, the monthly statement comprises a plurality of pieces of data of at least one economic organization, and each piece of data is used for recording monthly settlement data of an accounting subject of one economic organization in at least one month; the method comprises the following steps:
receiving an acquisition request of a target financial statement of a user, wherein the acquisition request comprises: an identification of the target financial statement;
determining the identifiers of N target accounting subjects required for generating the target financial statement according to the identifier of the target financial statement; n is an integer greater than or equal to 1;
reading monthly settlement data of each target accounting subject from a monthly settlement table of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject;
generating the target financial statement according to the monthly data of each target accounting subject;
and outputting the target financial statement.
Optionally, the generating the target financial statement according to the monthly data of each target accounting subject includes:
acquiring an identifier of a target month;
according to the identification of the target month, identifying and obtaining the monthly settlement amount of each target accounting subject in the target month from each piece of target monthly settlement data;
and generating the target financial statement according to the monthly sum of each target accounting subject in the target month and the corresponding calculation mode of the target financial statement.
Optionally, the database further stores an accounting document detail data table, and the method further includes:
reading target accounting document detail data of each accounting subject of a first economic organization from an accounting document detail data table of the database at a timing updating moment corresponding to the first economic organization;
aiming at any one accounting subject of each first economic organization, obtaining updated monthly data of the accounting subject according to the target accounting document detail data of the accounting subject and the current monthly data of the accounting subject;
updating a monthly statement of the database using the updated monthly settlement data for each accounting subject of the first economic organization.
Optionally, before the reading of the target accounting document detail data of each accounting subject of the first economic organization from the accounting document detail data table of the database, the method further comprises:
obtaining an identification of the first economic tissue;
and determining each timing updating moment corresponding to the first economic organization according to the identification of the first economic organization.
Optionally, each economic organization identifier includes a plurality of fields, and values of target fields of the plurality of fields are related to timing update time of the economic organization.
Optionally, the reading, from the accounting document detail data table of the database, target accounting document detail data of each accounting subject of the first economic organization includes:
reading time stamps of initial accounting document detail data of accounting subjects of a first economic organization from an accounting document detail data table of the database;
judging whether the time of storing the initial accounting document detail data of each accounting department of the first economic organization into the database is after the updating time of the previous time according to the time stamp of the initial accounting document detail data of each accounting department of the first economic organization;
and taking the initial accounting document detail data stored in the database after the last timing updating time as target accounting document detail data, and reading the target accounting document detail data from an accounting document detail data table of the database.
Optionally, the database stores a historical accounting document detail data table, and the method further includes:
and responding to a data migration instruction, and migrating target data in the accounting document detail data table in the database within a preset time period to a historical accounting document detail data table.
Optionally, before receiving the request for obtaining the target financial statement of the user, the method further includes:
receiving login information of a user; the login information is used for logging in the financial management system;
and determining the identifier of the economic organization to which the user belongs according to the login information and the mapping relation between the login information and the identifier of the economic organization.
In a second aspect, the present application provides a data query device, which is applied to a financial management system, wherein a database of the financial management system stores a monthly statement, the monthly statement comprises a plurality of pieces of data of at least one economic organization, and each piece of data is used for recording monthly settlement data of an accounting subject of one economic organization in at least one month; the device comprises:
the receiving module is used for receiving an acquisition request of a target financial statement of a user, and the acquisition request comprises: an identification of the target financial statement;
the processing module is used for determining the identifiers of the N target accounting subjects required by the generation of the target financial statement according to the identifier of the target financial statement; n is an integer greater than or equal to 1;
the reading module is used for reading monthly settlement data of each target accounting subject from a monthly settlement table of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject;
the generating module is used for generating the target financial statement according to the monthly data of each target accounting subject;
and the output module is used for outputting the target financial statement.
In a third aspect, the present application provides an electronic device, comprising: at least one processor, a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the electronic device to perform the method of any of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement the method of any one of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method of any of the first aspects.
According to the data query method, the data query device, the electronic equipment, the storage medium and the program product, each piece of data in a monthly statement of a database of the financial management system is used for recording monthly settlement data of an accounting subject of an economic organization in at least one month. Compared with the existing monthly settlement table in which each piece of data is only used for recording monthly settlement data of one accounting subject of one economic organization in one month, the method and the system reduce the storage quantity of the data in the monthly settlement table, and further reduce the number of pieces of data which need to be traversed when the financial management system reads the monthly settlement data of each target accounting subject from the monthly settlement table according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject, so that the efficiency of the financial management system for acquiring the monthly settlement data from the database is improved. After acquiring the monthly data of each target accounting subject, the financial management system can generate and output a target financial statement based on the monthly data. By the method, the storage quantity of data in the monthly statement is reduced, the efficiency of acquiring monthly statement data from the database is improved, and the efficiency of inquiring the target financial statement based on the financial management system is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a schematic view of an application scenario of a three-asset management system provided in the present application;
FIG. 2 is a schematic diagram of a hardware configuration of an electronic device with a financial management system deployed;
FIG. 3 is a schematic flow chart of a data query method provided in the present application;
FIG. 4 is a flowchart illustrating a monthly statement update method according to the present application;
fig. 5 is a schematic structural diagram of a data query device provided in the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the technical scheme of the application, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the related information such as financial data or user data and the like all accord with the regulations of related laws and regulations and do not violate the good custom of the public order.
The following first explains the noun concept related to the present application:
accounting subjects: the accounting subjects are categories for performing classification and accounting on the specific contents of the accounting element objects.
Accounting documents: the accounting documents can be divided into original documents and bookkeeping documents according to the classification of programming and use. The original document, which may also be referred to as a receipt or a receipt, is an original written certificate, such as a sales invoice, a receipt, etc., that is filled in when the economic transaction initially occurs. The bookkeeping voucher, which can be called as a bookkeeping voucher, is classified according to the content of the economic business matters based on the original voucher without error verification, and the bookkeeping voucher filled after the accounting entry is determined according to the classified content.
SQL: a Structured Query Language (SQL) is called Structured Query Language for short.
To facilitate rural economic development, each village may be provided with at least one economic organization. Each economic organization has independent financial data. Wherein, each economic organization can correspond to a plurality of accounting subjects so as to classify and account the specific contents of the accounting element objects.
Currently, monthly knots may be made for each accounting subject. Here, the term "monthly settlement" may be performed at the end of each month or on a predetermined day of each month. The monthly summary content may include, for example: settlement of monthly generated amount of the accounting subject, settlement of monthly balance of the accounting subject, and the like. According to the monthly settlement contents corresponding to different accounting subjects of an economic organization, a plurality of financial statements corresponding to the economic organization can be calculated. Illustratively, the financial statements may include, for example, at least one of: a subject balance sheet, an accounting general sheet, a subject itemization sheet, an asset liability sheet, a cashier balance summary sheet, a profit and income distribution sheet, an income and expense statement sheet, a cashier account sheet, and the like.
At present, three resources corresponding to each economic organization can be managed through a three-resource financial management system. Fig. 1 is a schematic view of an application scenario of a three-asset management system provided in the present application. As shown in fig. 1, the three-asset management system may include a server, and a database. The user can log in the three-asset management system through the terminal equipment. In the database of the three-asset financial management system, a monthly settlement table may be provided for storing monthly settlement data corresponding to each accounting subject of each economic organization. The server of the three-asset financial management system can acquire monthly settlement data required for generating the financial statement from the monthly settlement table of the database, generate the financial statement and feed the financial statement back to the terminal equipment. Then, the user can view various types of financial reports of the user through the terminal equipment.
It should be understood that fig. 1 is only an example of a terminal device as a computer, and the type of the terminal device is exemplified. The present application does not limit the types of the terminal devices. Illustratively, the terminal device may also be a terminal such as a mobile phone, a tablet computer, and the like.
In the existing three-asset management system, the monthly statement in the database includes a plurality of pieces of data of at least one economic organization. In the month calculation table, the data in the same row is a piece of data. Wherein each piece of data is used for recording monthly data of one accounting subject of one economic organization in one month. That is to say: in one piece of data, an economic organization code, an accounting code, a month identification, and month knot data for the month may be included.
For example, assuming that monthly settlement data of 12 months for M economic organizations (assuming that each economic organization corresponds to K accounting subjects) are recorded in the monthly settlement table of the database, the number L of pieces of data stored in the monthly settlement table of the database can be represented by the following formula (1):
L=M×K×12 (1)
wherein M and K are integers greater than or equal to 1.
However, in fact, taking the number of economic organizations included in one province as an example, the number of economic organizations included in one province can reach hundreds of thousands of levels. The number L of data stored in the monthly settlement table of the database can reach hundred million.
When the existing data query method is used for querying and generating data required by the financial statement of the target month from the existing database monthly statement, the financial management system needs to traverse each piece of data in the monthly statement according to the codes of economic organizations, the codes of accounting subjects and the identification of the target month, and query and obtain the data required for generating the financial statement of the target month from the monthly statement.
For example, still assuming that the monthly settlement table of the database records the monthly settlement data of 12 months for M economic organizations (assuming that each economic organization corresponds to K accounting subjects), taking the example that the three-asset management system needs to generate the financial statement of 2 months, the three-asset management system may traverse M × K × 12 pieces of data in the monthly settlement table through the codes of the economic organizations, the codes of the accounting subjects, and the identification of 2 months, so as to obtain the data required for generating the financial statement of 2 months from the monthly settlement table.
However, as mentioned above, the number of pieces of data stored in the monthly statement of the database may often reach the hundred million level. If through the existing data query method, traverse the hundred million level data in the monthly statement, will consume a large amount of time, and then cause the existing data query method to have the problem of low financial statement output efficiency.
Considering that the reason that the existing data query method has the problem of low efficiency is that the number of data pieces in the monthly settlement table of the database is large, the application provides a method for reducing the storage capacity of the number of data pieces in the monthly settlement table. Through reducing the storage capacity of the number of data in the monthly statement, the efficiency of the financial management system for traversing the monthly statement to acquire the data required by generating the financial statement is improved, and the output efficiency of the financial statement is further improved. The data query method provided by the application can be applied to a financial management system. The financial management system can be the three-resource financial management system, and can also be a financial management system for providing financial statements of other scenes for the user, which is not limited in the application.
Furthermore, it should be understood that fig. 1 is an exemplary illustration of an application scenario of the financial management system, taking the financial management system as an example, including a server and a database. The application scenario of the financial management system is not limited in the present application.
In one embodiment, the financial management system may be deployed entirely in a cloud environment. The cloud environment is an entity which provides cloud services to users by using basic resources in a cloud computing mode. A cloud environment includes a cloud data center that includes a large number of infrastructure resources (including computing resources, storage resources, and network resources) owned by a cloud service provider, which may include a large number of computing devices (e.g., servers), and a cloud service platform. For example, taking the example that the computing resources included in the cloud data center are servers running virtual machines, the financial management system may be deployed independently on the servers or virtual machines in the cloud data center, or the financial management system may be deployed in a distributed manner on multiple servers in the cloud data center, or on multiple virtual machines in the cloud data center, or on the servers and virtual machines in the cloud data center.
In another embodiment, the financial management system provided herein may also be deployed in different environments in a distributed manner. The financial management system provided by the present application may be logically divided into multiple sections, each section having a different function. Portions of the financial management system may be deployed in any two or three of the terminal computing device (on the user side), the edge environment, and the cloud environment, respectively. The terminal computing device located at the user side may, for example, include at least one of: terminal server, smart mobile phone, notebook computer, panel computer, personal desktop computer, etc. An edge environment is an environment that includes a set of edge computing devices that are closer to a terminal computing device, the edge computing devices including: edge servers, edge kiosks that possess computational power, etc. The various parts of the financial management system deployed in different environments or devices are cooperatively implemented to provide financial management functions for users. It should be understood that, in the embodiment of the present application, the specific deployments of which parts of the financial management system are specifically deployed in what environment are not restrictively divided, and in actual application, adaptive deployments may be performed according to the computing capability of the terminal computing device, the resource occupation of the edge environment and the cloud environment, or the specific application requirements.
The financial management system may also be deployed separately on an electronic device in any environment (e.g., separately on an edge server in an edge environment). Fig. 2 is a schematic diagram of a hardware structure of an electronic device with a financial management system deployed. As shown in fig. 2, the electronic device 10 may include: at least one processor 11 and a memory 12.
And a memory 12 for storing a program. In particular, the program may include program code comprising computer operating instructions.
The memory 12 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Processor 11 is operative to execute computer-executable instructions stored in memory 12 to implement a data query method as described in the method embodiments below. The processor 11 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Optionally, the electronic device 10 may further include a communication interface 13. In a specific implementation, if the communication interface 13, the memory 12 and the processor 11 are implemented independently, the communication interface 13, the memory 12 and the processor 11 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Alternatively, in a specific implementation, if the communication interface 13, the memory 12 and the processor 11 are integrated into a chip, the communication interface 13, the memory 12 and the processor 11 may complete communication through an internal interface.
The technical solution of the present application will be described in detail with reference to specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a schematic flowchart of a data query method provided in the present application. As shown in fig. 3, the method comprises the steps of:
s101, receiving an acquisition request of a target financial statement of a user.
Wherein, the obtaining request may include: identification of the target financial statement. For example, the identifier of the target financial statement may be, for example, a name of the target financial statement, or a code corresponding to the target financial statement. It should be understood that the present application is not limited to the types of target financial statements described above. Illustratively, as mentioned above, the target financial statement may be, for example, a balance sheet, an income/expense sheet, a cashier sheet, or the like.
Taking the financial management system as the financial management system shown in fig. 1 as an example, the financial management system may receive, through the terminal device, an acquisition request input by a user, and send the acquisition request to the server. It should be understood that the specific implementation manner of the terminal device receiving the user input acquisition request is not limited in the present application. Illustratively, the terminal device may display names of multiple types of financial reports, and the user may trigger the acquisition request of the target financial report by clicking the name of the financial report desired to be viewed.
S102, determining the identifiers of the N target accounting subjects required by the generation of the target financial statement according to the identifiers of the target financial statement.
Wherein N is an integer of 1 or more. The identifier of the target accounting subject may be, for example, a code of the target accounting subject.
Optionally, after acquiring the identifier of the target financial statement, the financial management system may determine, according to the identifier of the target financial statement and a mapping relationship between the identifier of the financial statement and identifiers of the accounting subjects required for generating the financial statement, identifiers of N target accounting subjects required for generating the target financial statement. The mapping relationship between the identifier of the financial statement and the identifier of each accounting subject required for generating the financial statement may be stored in the financial management system in advance for the user, for example. For example, the mapping relationship between the identification of the financial statement and the identification of each accounting subject required for generating the financial statement may be as shown in table 1 below:
TABLE 1
Figure BDA0003554712470000091
Figure BDA0003554712470000101
For example, assuming that the identifier of the target financial report is the identifier 2 of the financial report, taking the mapping relationship shown in table 1 as an example, the financial management system may determine that the identifiers of the N target accounting subjects required for generating the target financial report are the identifier 2 of the accounting subject and the identifier 3 of the accounting subject, respectively.
S103, reading monthly settlement data of each target accounting subject from a monthly settlement table of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject.
A monthly statement is stored in the database of the financial management system. The monthly statement includes a plurality of pieces of data for at least one economic organization. Wherein each piece of data is used for recording monthly data of an accounting subject of an economic organization in at least one month.
For example, taking 12 months of monthly settlement data as an example, as mentioned above, each piece of data in the existing monthly settlement table is used to record monthly settlement data of one accounting subject of one economic organization in one month, and the monthly settlement data of one accounting subject of one economic organization in 12 months needs to use 12 data records in the monthly settlement table. In the present application, each piece of data in the monthly statement is used to record monthly settlement data of one accounting subject of one economic organization in at least one month, and the monthly settlement data of one accounting subject of one economic organization in 12 months only needs to use 1 data record in the monthly statement. That is, in this example, by the above method, the number of data pieces stored in the monthly statement is 1/12 in the prior art, so that the number of data pieces of the monthly statement that the financial management system needs to traverse is reduced, and the efficiency of the financial management system traversing the monthly statement of the database is improved.
And S104, generating a target financial statement according to the monthly data of each target accounting department.
The financial statements of different types can be calculated in different modes. The financial management system can also store financial statement calculation modes corresponding to a plurality of types of financial statements. Optionally, the financial management system may determine, for example, a calculation mode corresponding to the target financial statement according to the identifier of the target financial statement. Then, the financial management system can generate a target financial statement according to the monthly data of each target accounting department by using a calculation mode corresponding to the target financial statement.
And S105, outputting the target financial statement.
Still taking the financial management system as shown in fig. 1 as an example, the financial management system may output the target financial statement through a terminal device, for example. Illustratively, the terminal device may display the target financial statement through a display device, for example, so that the user can view the target financial statement.
In this embodiment, each piece of data in the monthly statement of the database of the financial management system is used to record monthly settlement data for at least one month of an accounting subject of an economic organization. Compared with the existing monthly settlement table in which each piece of data is only used for recording monthly settlement data of one accounting subject of one economic organization in one month, the method and the system reduce the storage quantity of the data in the monthly settlement table, and further reduce the number of pieces of data which need to be traversed when the financial management system reads the monthly settlement data of each target accounting subject from the monthly settlement table according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject, so that the efficiency of the financial management system for acquiring the monthly settlement data from the database is improved. After acquiring the monthly data of each target accounting subject, the financial management system can generate and output a target financial statement based on the monthly data. By the method, the storage quantity of the data in the monthly statement is reduced, the efficiency of acquiring the monthly statement data from the database is improved, and the efficiency of inquiring the target financial statement based on the financial management system is improved.
The following describes in detail how the financial management system generates a target financial statement according to the monthly data of each target accounting department:
as a possible implementation, the financial management system may first obtain an identification of the target month. And then, according to the identification of the target month, identifying and obtaining the monthly settlement amount of each target accounting subject in the target month from the entry monthly settlement marking data. Then, according to the monthly sum of each target accounting subject in the target month and the corresponding calculation mode of the target financial statement, the financial management system can generate the target financial statement.
Optionally, the financial management system may receive user input of an identification of the target month. In this implementation, the identification of the target month may be carried in the acquisition request of the target financial statement of the user, for example. Alternatively, the target month may be the current month. That is, the financial management system may retrieve the current month and retrieve the target financial statement for the current month.
Illustratively, the monthly balance may be a monthly balance, for example.
Optionally, for any piece of target month ending data, the financial management system identifies the target month ending data according to the identifier of the target month, and the identification manner for identifying the month ending amount of the target month in the entry marked month ending data may be, for example, that the month ending amount of the target month in the target month ending data is obtained by using the identifier of the target month as a pointer.
In this embodiment, the financial management system may identify, from the entry monthly statement data, a monthly statement amount of each target accounting subject in the target month according to the identifier of the target month. Compared with the method that the financial management system in the prior art needs to traverse a large amount of data in the monthly statement to obtain the monthly settlement amount of the target month, the method and the system do not need to traverse the monthly statement when the monthly settlement amount of the target month is obtained based on the identification of the target month, so that the efficiency of obtaining the monthly settlement amount of the target month is improved, and the efficiency of inquiring the target financial statement based on the financial management system is further improved.
The following is a detailed description of how the financial management system obtains the identity of the economic organization to which the user belongs:
as a possible implementation manner, the financial management system can receive login information of a user for logging in the financial management system before receiving an acquisition request of a target financial statement of the user. The login information may include, for example, a user name and a password of the user. Then, the financial management system can determine the identifier of the economic organization to which the user belongs according to the login information and the mapping relation between the login information and the identifier of the economic organization. The mapping relationship between the login information and the economic organization identifier may be stored in the financial management system for the user in advance.
For example, taking the example that the login information includes the user name of the user, the mapping relationship between the login information and the identifier of the economic organization may be as shown in the following table 2:
TABLE 2
User name Identification of economic organizations
User name 1 Economic organisation identifier 1
User name 2 Economic organization identifier 2
User name 3 Economic organization identifier 3
For example, assuming that the user name included in the login information is a user name 1, and taking the mapping relationship shown in table 2 as an example, the financial management system may determine that the identifier of the economic organization to which the user belongs is an identifier 1 of the economic organization.
As another possible implementation, the financial management system may also receive user input of an identification of an economic organization to which the user belongs, for example. Illustratively, the financial management system may receive, for example, via a terminal device such as that shown in FIG. 1, a user input identifying an economic organization to which the user belongs.
In this embodiment, the financial management system may determine the identifier of the economic organization to which the user belongs, through the login information of the user and the mapping relationship between the login information and the identifier of the economic organization. By the method, the financial management system can automatically determine the identifier of the economic organization to which the user belongs without manually selecting the identifier of the economic organization by the user, and the efficiency of inquiring the target financial statement is further improved.
As a possible implementation manner, the database of the financial management system may further store an accounting document detail data table, and the financial management system may store accounting document detail data of each economic organization in each month in the accounting document detail data table. In this implementation, the financial management system may update the monthly statement of the database based on the accounting statement detail data in the accounting statement detail data table, so that each piece of data in the monthly statement may store monthly amounts of money for a plurality of months, and improve accuracy of obtaining the target financial statement based on the monthly amounts of data in the monthly statement.
The following is a detailed description of how the financial management system updates the monthly statement in the database:
fig. 4 is a flowchart illustrating a method for updating a monthly statement according to the present application. As shown in fig. 4, as a possible implementation manner, the method may include the following steps:
s201, at the timing updating time corresponding to the first economic organization, reading target accounting document detail data of each accounting subject of the first economic organization from an accounting document detail data table of the database.
The first economic organization may be any economic organization. The accounting document detail data may include at least one of: original voucher detail data and bookkeeping voucher detail data. The original credential details data may also be referred to as cashier credential details data.
In some embodiments, the target accounting document detail data may refer to accounting document detail data of each accounting subject of the first economic organization within a preset time duration. The preset time period may be, for example, one month.
In some embodiments, the financial management system may further determine the target accounting document detail data based on a time stamp of each initial accounting document detail data of each accounting department purpose of the first economic organization in the accounting document detail data table.
Optionally, the financial management system may also first read a time stamp of each initial accounting document detail data of each accounting subject of the first economic organization from an accounting document detail data table of the database. And then judging whether the time of storing the initial accounting document detail data of each accounting subject of the first economic organization into the database is after the time of updating the time according to the time stamp of the initial accounting document detail data of each accounting subject of the first economic organization.
If the time indicated by the time stamp of the initial accounting document detail data is after the last time updating time, the financial management system does not calculate the initial accounting document detail data when the month calculation table corresponding to the first economic organization is updated last time. The financial management system may take the initial accounting document particulars data after the last timing update timing of the timing of storing in the database as the target accounting document particulars data and read the target accounting document particulars data from the accounting document particulars data table of the database.
If the time indicated by the time stamp of the initial accounting document detail data is before or equal to the last time updating time, the financial management system calculates the initial accounting document detail data when the month calculation table corresponding to the first economic organization is updated last time. The financial management system may not read the initial accounting document detail data from the accounting document detail data table of the database. If the time indicated by the time stamp of the initial accounting document detail data of each accounting subject of the first economic organization is all before or equal to the last timing updating time, the month ending data of the first economic organization in the month calculation table is not updated at the timing updating time.
In this implementation, any entry labeled accounting document detail data is only computed once for updating the monthly statement. That is to say, the financial management system can only update the monthly statement based on the new accounting document detail data, so that the calculation amount is reduced, and the updating efficiency is improved.
S202, aiming at any accounting subject of each first economic organization, according to the target accounting document detail data of the accounting subject and the current monthly data of the accounting subject, obtaining the updated monthly data of the accounting subject.
In the method, the calculation modes corresponding to the monthly data of different accounting subjects can be different or the same. Aiming at each accounting subject, the financial management system can use a monthly data calculation method corresponding to each accounting subject to calculate the target accounting document detail data of each accounting subject on the basis of the current monthly data of each accounting subject so as to obtain the updated monthly data of each accounting subject.
S203, the monthly settlement table of the database is updated by using the updated monthly settlement data of each accounting subject of the first economic organization.
After obtaining the updated monthly settlement data of each accounting subject of the first economic organization, the financial management system may replace the monthly settlement amount of the corresponding month in the monthly settlement data corresponding to the corresponding subject in the monthly settlement table of the database by using the updated monthly settlement data, so as to update the monthly settlement table of the database.
The financial management system can execute the steps S201 to S203 at each timing update time corresponding to the first economic organization according to a preset period, so as to periodically update the monthly statement in the database at a fixed time.
In the present embodiment, the monthly statement is updated at each timing update time based on the target accounting document detail data of each accounting subject of the first economic organization in the accounting document detail data table of the database. By the method, the monthly statement can be updated regularly, and accuracy of monthly statement data in the monthly statement is improved. By the method, monthly settlement updating triggered manually at the same time is avoided, and the operation burden of a financial management system at the peak moment is reduced. In addition, through the method, when a user inputs new accounting document detail data to the financial management system, the financial management system can output a new financial statement based on the new accounting document detail data by updating the monthly statement regularly, so that quasi-real-time updating is realized.
In this implementation, a detailed description of how the financial management system determines the timing update times for the first economic organization follows:
as one possible implementation, the financial management system may obtain the identity of the first economic organization prior to reading the target accounting document detail data for each accounting subject of the first economic organization from the accounting document detail data table of the database. The identification of the first economic organization may be, for example, a code of the first economic organization. The identification of the first economic organization may be pre-stored by the user in the financial management system.
The financial management system may then determine respective timing update times for the first economic organization based on the identification of the first economic organization. Optionally, taking an example that each economic organization identifier includes a plurality of fields, the timing update time of each economic organization may be related to values of target fields of the plurality of fields. Wherein, the plurality of fields may include at least one of the following: english letters and numbers. The target field of the plurality of fields may be a field of a target location, or may refer to a specific field. For example, the field of the target location may be a field of a last location in the plurality of fields. The specific fields may be predetermined for the user and stored in the financial management system, for example.
For example, in the case that the last digit of the plurality of fields included in the identifier of each economic organization is a number, optionally, the financial management system may make the timing update time corresponding to the economic organization with the same last digit be the same. By the method, the economic organization can be divided into ten groups according to the number of 0-9, and each updating period carries out 10 timed updating tasks. Wherein, the timing updating time corresponding to the same group of economic organizations is the same. The timing update time corresponding to the economic organization is different between different groups. It should be understood that the present application is not limited to the interval duration between the timing update times.
As another possible implementation manner, the financial management system may also determine a plurality of update times in an update cycle, and then determine the economic organization corresponding to each update time. The plurality of update times may be preset by a user, for example. The financial management system may determine the economic organization corresponding to each update time, for example, by randomly assigning, and may further determine the timing update time corresponding to the first economic organization. The number of economic organizations corresponding to each update time may be the same or different.
In some embodiments, in the case of a small usage amount of the financial management system, the financial management system may also update monthly settlement data of the accounting subjects of the economic organization to which the accounting document detail data belongs in the monthly statement according to the accounting document detail data every time accounting document detail data input by the user is received. By the method, the real-time target financial statement query can be realized under the computing power of the financial management system.
Further, as a possible implementation manner, the database may further store a historical accounting document detail data table. In this implementation, the financial management system may further migrate, in response to the data migration instruction, target data in the accounting document detail data table in the database within a preset time period to the historical accounting document detail data table.
Illustratively, the preset time period may be, for example, 1 month to 12 months of a year preceding the current year. After the target data is migrated to the historical accounting document detail data table, only the accounting document detail data of the current year can be stored in the accounting document detail data table. The financial management system may be responsive to user input of data migration instructions, for example.
By the method, the data storage amount in the accounting document detail data table can be reduced, the efficiency of the financial management system for acquiring the target accounting document detail data of each accounting subject of the first economic organization from the accounting document detail data table can be improved, and the efficiency of the financial management system for updating the monthly statement of the database is further improved.
Fig. 5 is a schematic structural diagram of a data query device provided in the present application. The device is applied to a financial management system, and a monthly statement is stored in a database of the financial management system. The monthly statement includes a plurality of pieces of data. Wherein each piece of data is used for recording monthly data of an accounting subject of an economic organization in at least one month. As shown in fig. 5, the apparatus includes: a receiving module 31, a processing module 32, a reading module 33, a generating module 34, and an output module 35. Wherein, the first and the second end of the pipe are connected with each other,
the receiving module 31 is configured to receive an acquisition request of a target financial statement of a user. Wherein the obtaining request comprises: an identification of the target financial statement.
And the processing module 32 is configured to determine, according to the identifier of the target financial statement, identifiers of N target accounting subjects required for generating the target financial statement. Wherein N is an integer greater than or equal to 1.
And the reading module 33 is configured to read the monthly settlement data of each target accounting subject from the monthly settlement table of the database according to the identifier of the economic organization to which the user belongs and the identifier of each target accounting subject.
And the generating module 34 is configured to generate the target financial statement according to the monthly data of each target accounting subject.
And the output module 35 is used for outputting the target financial statement.
Optionally, the generating module 34 is specifically configured to obtain an identifier of the target month; according to the identification of the target month, identifying and obtaining the monthly settlement amount of each target accounting subject in the target month from each piece of target monthly settlement data; and generating the target financial statement according to the monthly sum of each target accounting subject in the target month and the corresponding calculation mode of the target financial statement.
Optionally, the database further stores an accounting document detail data table. In this implementation, the reading module 33 is further configured to read, from the accounting document detail data table of the database, the target accounting document detail data of each accounting subject of the first economic organization at the timing update time corresponding to the first economic organization. The processing module 32 is further configured to, for any accounting subject of each first economic organization, obtain updated monthly statement data of the accounting subject according to the target accounting document detail data of the accounting subject and the current monthly statement data of the accounting subject. The apparatus may also include an update module 36 for updating a monthly statement of the database using the updated monthly statement data for each accounting subject of the first economic organization.
Optionally, the processing module 32 is further configured to obtain an identifier of the first economic organization before the target accounting document detail data of each accounting subject of the first economic organization is read from the accounting document detail data table of the database; and determining each timing updating moment corresponding to the first economic organization according to the identification of the first economic organization.
Optionally, each economic organization identifier includes a plurality of fields, and values of target fields of the plurality of fields are related to timing update time of the economic organization.
Optionally, the reading module 33 is specifically configured to read, from the accounting document detail data table of the database, a time stamp of each initial accounting document detail data of each accounting department of the first economic organization. Optionally, the processing module 32 is specifically configured to determine, according to the timestamp of each piece of initial accounting document detail data of each accounting department of the first economic organization, whether a time when each piece of initial accounting document detail data of each accounting department of the first economic organization is stored in the database is after a time of the last timing update. Optionally, the reading module 33 is specifically configured to take the initial accounting document detail data after the last time update time stored in the database as target accounting document detail data, and read the target accounting document detail data from an accounting document detail data table of the database.
Optionally, the database stores a historical accounting document detail data table. In this implementation, the processing module 32 is further configured to migrate, in response to the data migration instruction, target data in the accounting document detail data table in the database within a preset time period to the historical accounting document detail data table.
Optionally, the receiving module 31 is further configured to receive login information of the user before receiving the request for acquiring the target financial statement of the user. Wherein the login information is used for logging in the financial management system. Optionally, the processing module 32 is further configured to determine, according to the login information and a mapping relationship between the login information and an identifier of an economic organization, an identifier of the economic organization to which the user belongs.
The data query device provided by the application is used for executing the data query method embodiment, and the implementation principle and the technical effect are similar, which are not described again.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and in particular, the computer-readable storage medium stores program instructions, and the program instructions are used in the method in the foregoing embodiments.
The present application further provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the electronic device may read the execution instruction from the readable storage medium, and the at least one processor executes the execution instruction to enable the electronic device to implement the data query method provided by the various embodiments described above.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A data query method is applied to a financial management system, a database of the financial management system stores a monthly statement, the monthly statement comprises a plurality of data of at least one economic organization, and each data is used for recording monthly settlement data of an accounting subject of one economic organization in at least one month; the method comprises the following steps:
receiving an acquisition request of a target financial statement of a user, wherein the acquisition request comprises the following steps: an identification of the target financial statement;
determining the identifiers of N target accounting subjects required by the generation of the target financial statement according to the identifier of the target financial statement; n is an integer greater than or equal to 1;
reading monthly settlement data of each target accounting subject from a monthly settlement table of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject;
generating the target financial statement according to the monthly data of each target accounting subject;
and outputting the target financial statement.
2. The method of claim 1, wherein generating the target financial statements according to monthly data for each of the target accounting subjects comprises:
acquiring an identifier of a target month;
according to the identification of the target month, identifying and obtaining the monthly settlement amount of each target accounting subject in the target month from each piece of target monthly settlement data;
and generating the target financial statement according to the monthly sum of each target accounting subject in the target month and the corresponding calculation mode of the target financial statement.
3. The method of claim 1, wherein the database further stores accounting document detail data tables, the method further comprising:
reading target accounting document detail data of each accounting subject of a first economic organization from an accounting document detail data table of the database at a timing updating moment corresponding to the first economic organization;
aiming at any one accounting subject of each first economic organization, obtaining updated monthly data of the accounting subject according to the target accounting document detail data of the accounting subject and the current monthly data of the accounting subject;
updating a monthly statement of the database using the updated monthly statement data for each accounting subject of the first economic organization.
4. The method of claim 3, wherein prior to said reading the target accounting document detail data for each accounting subject of the first economic organization from the accounting document detail data table of the database, the method further comprises:
obtaining an identification of the first economic tissue;
and determining each timing updating moment corresponding to the first economic organization according to the identification of the first economic organization.
5. The method of claim 4, wherein each economic organization identifier comprises a plurality of fields, and wherein values of target fields of the plurality of fields are related to timing update times of the economic organization.
6. The method of any one of claims 3-5, wherein reading the target accounting document detail data for each accounting subject of the first economic organization from the accounting document detail data table of the database comprises:
reading time stamps of initial accounting document detail data of accounting subjects of a first economic organization from an accounting document detail data table of the database;
judging whether the time of storing the initial accounting document detail data of each accounting department of the first economic organization into the database is after the updating time of the previous time according to the time stamp of the initial accounting document detail data of each accounting department of the first economic organization;
and taking the initial accounting document detail data stored in the database after the last timing updating time as target accounting document detail data, and reading the target accounting document detail data from an accounting document detail data table of the database.
7. The method of claim 1 or 2, wherein the database stores a historical accounting document detail data table, the method further comprising:
and responding to a data migration instruction, and migrating target data in the accounting document detail data table in the database within a preset time period to a historical accounting document detail data table.
8. The method according to claim 1 or 2, wherein before said receiving a request for acquisition of a target financial statement of a user, the method further comprises:
receiving login information of a user; the login information is used for logging in the financial management system;
and determining the identifier of the economic organization to which the user belongs according to the login information and the mapping relation between the login information and the identifier of the economic organization.
9. A data inquiry device is applied to a financial management system, a database of the financial management system stores a monthly statement, the monthly statement comprises a plurality of data of at least one economic organization, and each data is used for recording monthly settlement data of an accounting subject of one economic organization in at least one month; the device comprises:
the receiving module is used for receiving an acquisition request of a target financial statement of a user, and the acquisition request comprises: an identification of the target financial statement;
the processing module is used for determining the identifiers of the N target accounting subjects required by the generation of the target financial statement according to the identifier of the target financial statement; n is an integer greater than or equal to 1;
the reading module is used for reading monthly settlement data of each target accounting subject from a monthly statement of the database according to the identification of the economic organization to which the user belongs and the identification of each target accounting subject;
the generating module is used for generating the target financial statement according to the monthly data of each target accounting subject;
and the output module is used for outputting the target financial statement.
10. An electronic device, comprising: at least one processor, a memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the electronic device to perform the method of any of claims 1-8.
11. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-8.
12. A computer program product comprising a computer program, characterized in that the computer program realizes the method of any of claims 1-8 when executed by a processor.
CN202210271146.4A 2022-03-18 2022-03-18 Data query method, data query device, electronic equipment, storage medium and program product Pending CN114647671A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210271146.4A CN114647671A (en) 2022-03-18 2022-03-18 Data query method, data query device, electronic equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210271146.4A CN114647671A (en) 2022-03-18 2022-03-18 Data query method, data query device, electronic equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN114647671A true CN114647671A (en) 2022-06-21

Family

ID=81995068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210271146.4A Pending CN114647671A (en) 2022-03-18 2022-03-18 Data query method, data query device, electronic equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN114647671A (en)

Similar Documents

Publication Publication Date Title
CN112882699B (en) Service processing method, device, equipment and medium based on flow configuration engine
US10511453B2 (en) Information processing system and charge calculation apparatus
CN110597511A (en) Page automatic generation method, system, terminal equipment and storage medium
CN113205402A (en) Account checking method and device, electronic equipment and computer readable medium
CN110019774B (en) Label distribution method, device, storage medium and electronic device
CN112258306B (en) Account information checking method, device, electronic equipment and storage medium
CN111507798B (en) Method, system and computer equipment for periodically verifying business transaction orders
CN116993523A (en) Configurable account checking method, device, equipment and storage medium
CN115994830A (en) Method for constructing fetch model, method for collecting data and related device
CN115878707A (en) Foreign exchange market data processing method and device, storage medium and equipment
CN114647671A (en) Data query method, data query device, electronic equipment, storage medium and program product
CN106874327B (en) Counting method and device for business data
CN111429125B (en) Account management method and device, storage medium and electronic equipment
CN116976800A (en) Data processing method and device, storage medium and electronic equipment
CN113901046A (en) Virtual dimension table construction method and device
CN111131393B (en) User activity data statistical method, electronic device and storage medium
CN112634012A (en) Service data processing method, device, server and storage medium
CN111176588A (en) Business document issuing method, device, medium and electronic equipment
CN116382924B (en) Recommendation method and device for resource allocation, electronic equipment and storage medium
CN114155038B (en) Epidemic situation affected user identification method
CN112148491B (en) Data processing method and device
CN110442587B (en) Service information upgrading method and terminal equipment
CN108256719B (en) Resource processing system and method
US20160162959A1 (en) Performance Optimization Utilizing Pre-Analysis of Condition Records
CN117635357A (en) Commission settlement method, apparatus, device and medium for insurance business

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination