Indicator-based data analysis method, device, server and readable storage medium
Through the distributed deployment of the server and execution end in the server, the data analysis is performed directly on the server and execution terminals, solving the problem of high traditional business data analysis costs and poor data maintenance, and data analysis of rapid response to business needs.
Patent Information
- Application Number
- CN201910416506.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-16
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2039-06-29
AI Technical Summary
In the traditional business data analysis process, scripts of data analysis logic need to be coupled in the code, resulting in high cost of business data analysis and poor data maintenance, which makes it impossible to quickly respond to the urgent business needs for data.
Distribute the server and execution terminal in the server, scan the preset task scheduling table in the server, determine the data analysis request to be executed, and determine the priority of the execution terminal according to the type of indicator type, extract the configuration information for analysis, directly in the analysis, directly in the Complete data analysis at the server and execution end to avoid coupled data analysis logic in the code.
It reduces the cost of analysis of business data, improves the maintenance of data, and can quickly respond to the emergency needs of data on data.
Smart Images

Figure CN110109978B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology of financial technology (Fintech), and in particular to an indicator-based data analysis method, device, server and readable storage medium. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance (Finteh), more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements for technology.
[0003] The model adopted by traditional business data applications is mainly to propose business requirements, and technical personnel develop according to the business requirements, use traditional BI (Business Intelligence, business intelligence analysis tools) to provide data query and analysis functions, obtain upstream data and perform corresponding ETL (Extract-Transform-Load) processing on the business statistical caliber, generate analysis reports on Hive, and then extract the reports into a relational database using Sqoop, and use BI tools for query and analysis.
[0004] It can be seen that in the traditional business data analysis process, the script of the data analysis logic needs to be coupled in the code. When there is an error in the data analysis logic, the code needs to be modified, which leads to high business data analysis costs. The data analysis logic is concentrated in the ETL processing process, and the data statistical caliber cannot be flexibly adjusted, resulting in poor data maintainability and inability to quickly respond to urgent business needs for data. Summary of the invention
[0005] The main purpose of the present invention is to provide an indicator-based data analysis method, device, server and readable storage medium, aiming to solve the technical problems of high cost of existing business data analysis and poor data maintainability.
[0006] To achieve the above object, the present invention provides an indicator-based data analysis method, which is applied to a server, in which a service end and an execution end are distributedly deployed, and the indicator-based data analysis method comprises the following steps:
[0007] Scanning a preset task scheduling table in the server to determine a data analysis request in the task scheduling table that is in a pending state;
[0008] Determining, at the execution end, the priority of the indicator corresponding to the data analysis request according to the indicator type corresponding to the data analysis request;
[0009] Extract configuration information of the indicator corresponding to the data analysis request, analyze the business data stored in the server according to the configuration information according to the priority, and obtain the indicator data corresponding to the data analysis request.
[0010] Preferably, the step of analyzing the business data stored in the server according to the priority and the configuration information to obtain the indicator data corresponding to the data analysis request includes:
[0011] According to the priority level and based on the statistical caliber of the indicators in the configuration information, the business data stored in the server cache database is analyzed to obtain the indicator data corresponding to the data analysis request.
[0012] Preferably, after the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the method further includes:
[0013] Detecting whether configuration information of the indicator corresponding to the data analysis request has been cached in the cache database of the server;
[0014] If it is detected that the configuration information is not cached in the cache database, the step of determining the priority of the indicator corresponding to the data analysis request in the execution end according to the indicator type corresponding to the data analysis request is executed.
[0015] Preferably, before the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the step further includes:
[0016] Acquire business data of an upstream system, and aggregate the business data in a preset first database according to the business fields and business themes to which the business data belongs, so as to generate a data model table;
[0017] The business data in the data model table is stored in a preset second database, and the business data in the second database corresponding to the data analysis request in the task scheduling table is stored in a cache database of the server.
[0018] Preferably, after the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the method further includes:
[0019] Parsing the data analysis request, and determining whether the data analysis request is parsed successfully;
[0020] If the data analysis request is parsed successfully, the step of determining the priority of the indicator corresponding to the data analysis request according to the indicator type corresponding to the data analysis request in the execution end is performed;
[0021] If the data analysis request fails to be parsed, the state corresponding to the data analysis request is modified to a scheduling failure state.
[0022] Preferably, before the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the step further includes:
[0023] When a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request is detected, the statistical caliber of the indicator corresponding to the data analysis request is set according to the setting instruction to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber.
[0024] Preferably, after the step of extracting the configuration information of the indicator corresponding to the data analysis request, analyzing the business data stored in the server according to the configuration information according to the priority, and obtaining the indicator data corresponding to the data analysis request, the step further includes:
[0025] The indicator data are aggregated according to preset dimensions to obtain aggregated indicator data, and the aggregated indicator data are stored.
[0026] Preferably, the step of aggregating the indicator data according to preset dimensions to obtain the aggregated indicator data comprises:
[0027] The indicator data are aggregated according to the institutional dimension to obtain the indicator data aggregated by different institutions.
[0028] In addition, to achieve the above-mentioned purpose, the present invention further provides an indicator-based data analysis device, which is applied to a server, in which a service end and an execution end are distributedly deployed, and the indicator-based data analysis device includes:
[0029] A scanning module, used for scanning a preset task schedule in the server;
[0030] A determination module, used to determine the data analysis request in the task scheduling table that is in a waiting state; and determine the priority of the indicator corresponding to the data analysis request in the execution end according to the indicator type corresponding to the data analysis request;
[0031] An extraction module, used to extract configuration information of indicators corresponding to the data analysis request;
[0032] The analysis module is used to analyze the business data stored in the server according to the priority and the configuration information to obtain the indicator data corresponding to the data analysis request.
[0033] In addition, to achieve the above-mentioned objectives, the present invention also provides a server, in which a service end and an execution end are distributedly deployed, and the server includes a memory, a processor, and an indicator-based data analysis program stored in the memory and executable on the processor, and the indicator-based data analysis program, when executed by the processor, implements the steps of the indicator-based data analysis method as described above.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which an indicator-based data analysis program is stored, and when the indicator-based data analysis program is executed by a processor, the steps of the indicator-based data analysis method as described above are implemented.
[0035] The present invention distributes the service end and the execution end in the server, scans the preset task scheduling table in the service end, determines the data analysis request in the task scheduling table that is in the waiting state; determines the priority of the data analysis request according to the indicator type corresponding to the data analysis request in the execution end; extracts the configuration information of the indicator corresponding to the data analysis request, analyzes the business data stored in the server according to the configuration information according to the priority, and obtains the indicator data corresponding to the data analysis request. In the process of analyzing business data, the business data analysis process according to the indicator corresponding to the data analysis request is completed directly in the service end and the execution end, and the script of the data analysis logic does not need to be coupled in the code, which reduces the cost of business data analysis and improves the maintainability of business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of a first embodiment of the indicator-based data analysis method of the present invention;
[0037] Figure 2 is a flow chart of a third embodiment of the indicator-based data analysis method of the present invention;
[0038] Figure 3 is a flow chart of a fourth embodiment of the indicator-based data analysis method of the present invention;
[0039] Figure 4 It is a functional schematic diagram module diagram of a preferred embodiment of the indicator-based data analysis device of the present invention;
[0040] Figure 5 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.
[0041] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0043] The present invention provides a data analysis method based on indicators, referring to Figure 1 , Figure 1 It is a flowchart of a preferred embodiment of the indicator-based data analysis method of the present invention.
[0044] The embodiment of the present invention provides an embodiment of the indicator-based data analysis method. It should be noted that although the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that here.
[0045] The indicator-based data analysis method is applied to a server, in which a server and an execution end are distributedly deployed, and a long connection is established between the server and the execution end. Specifically, the server can be a Linux server, or other servers with the same functions as the Linux server. For ease of description, the following describes various embodiments with components in the server that perform corresponding operations. The indicator-based data analysis method includes:
[0046] Step S10, scanning a preset task scheduling table in the server, and determining a data analysis request in a waiting state in the task scheduling table.
[0047] When the server receives the data analysis request, the server scans the preset task scheduling table, obtains the status identifier corresponding to each data analysis request in the task scheduling table, and determines the data analysis request with the status identifier as the pending execution identifier as the data analysis request in the pending execution state in the task scheduling table. In the task scheduling table, different data analysis requests are stored, and the data analysis request can be a data calculation task, a data query task, a data verification task, etc. There is a corresponding status identifier for each data analysis request, and whether the data analysis request needs to be executed can be determined based on the status identifier. It should be noted that if the server has obtained the business data corresponding to a data analysis request, that is, the business data corresponding to the data analysis request is ready, after receiving the data analysis request for the business data, the data analysis request can be directly executed. At this time, it indicates that the state corresponding to the data analysis request is a pending execution state, and a pending execution identifier can be added to the data analysis request. The specific form of the pending execution identifier is not limited in the embodiment of the present invention.
[0048] It should be noted that the data analysis request can be sent by the client. At this time, the user of the client can set the statistical caliber of the indicator corresponding to the data analysis request in the display interface of the client or the server. When the client sends a data analysis request to the server, the set statistical caliber and the data analysis request will be sent to the server together. After receiving the data analysis request, the server will store the data analysis request in the task scheduling table to detect whether the business data required for the data analysis request has been successfully obtained. If the business data corresponding to the data analysis request has been successfully obtained, a pending execution mark is added to the data analysis request. Among them, in the client or the server, the echarts.js framework, highcharts.js framework or Canvas / SVG (Scalable Vector Graphics) framework and native js framework can be used to display various indicators, so that the corresponding user can set the corresponding statistical caliber according to the indicator.
[0049] Furthermore, the data analysis request may also be pre-stored in the task scheduling table, and the execution time of the data analysis request has been set. If the current time is equal to the execution time or is within the time range corresponding to the execution time, the server will scan the task scheduling table. Furthermore, the server may also scan the task scheduling table regularly to obtain the data analysis requests in the task scheduling table that are in the waiting state, and the corresponding duration of the timing can be set according to specific needs.
[0050] Step S20, determining the priority of the indicator corresponding to the data analysis request in the execution end according to the indicator type corresponding to the data analysis request.
[0051] When the server determines that the data analysis request is in a pending state, the server sends the data analysis request in a pending state to the execution end, so as to determine the priority of the indicator corresponding to the data analysis request in the execution end according to the indicator type corresponding to the data analysis request. In an embodiment of the present invention, an indicator generally refers to a specific value of a business data, which is used to measure a business expectation data. According to the different uses of the indicator, the indicator is divided into four types: root indicator, combined indicator, derived indicator and general ledger indicator. Among them, the root indicator is defined based on a certain data model. A root indicator contains all the dimensions of the source data model plus a certain measurement. Its biggest feature is that a root indicator must have only one measurement value. Among them, the dimension is the specific condition for obtaining a certain measurement value in a certain data model, and it is the angle of observing data, such as product dimension, date dimension, etc.; the measurement generally refers to some quantifiable fields in the data model, such as indicator value, balance of the day, balance of the previous day, monthly average data and annual average data. The combined indicator is to look at a certain measurement value according to certain fixed dimension values. Adding dimension values to several dimension items contained in the root indicator is a combined indicator, such as adding product number to product dimension, and the product number is the latitude value. Derived indicators are calculated from several combined indicators according to certain logical relationships, such as the calculation of common mathematical formulas such as addition, subtraction, multiplication and division. It should be noted that all sub-indicators of derived indicators must have the same common dimension, otherwise the value of the derived indicator cannot be calculated. For example, both indicator A and indicator B must have the common dimension of product to calculate the sum of the number of people who purchased product A and product B. General ledger indicators are indicators specifically used for bank general ledger data. Generally, all accounts in the general ledger are defined as specific general ledger indicators, and their measurements are generally the debit and credit balances and debit and credit amounts of the accounts. It should be noted that a data analysis request can correspond to one or more indicator types.
[0052] When the execution end receives the data analysis request, the execution end determines the indicator type corresponding to the data analysis request. Specifically, each data analysis request has a corresponding indicator type, and each data analysis request has a request identifier, which can uniquely identify a data analysis request. Each indicator type has a corresponding type identifier, which can uniquely identify an indicator type. The request identifier and type identifier of the data analysis request are associated with each other, so the execution end can determine the associated type identifier through the request identifier of the data analysis request, and then determine the indicator type corresponding to the corresponding data analysis request according to the type identifier. After the execution end determines the indicator type of the data analysis request, it determines the priority of the indicator corresponding to the data analysis request according to the indicator type. Specifically, the priority of the indicator corresponding to the data analysis request can be determined according to the dependency relationship between the indicator types. For example, if the analysis of the business data corresponding to the first indicator needs to rely on the analysis results of the business data corresponding to the second indicator, the priority of the second indicator is higher than the priority of the first indicator. If there is no dependency relationship between the indicators corresponding to the indicator types, the priorities of the indicators corresponding to the data analysis requests are the same.
[0053] Step S30, extracting configuration information of the indicator corresponding to the data analysis request, analyzing the business data stored in the server according to the configuration information according to the priority, and obtaining the indicator data corresponding to the data analysis request.
[0054] The execution end extracts the configuration information of the indicator corresponding to the data analysis request, and analyzes the business data stored on the server according to the configuration information according to the priority of each indicator, and obtains the indicator data corresponding to the data analysis request. Among them, the configuration information includes but is not limited to the statistical caliber and the calculation formula between indicators. It can be understood that the calculation formula will only exist in the configuration information when there are derived indicators corresponding to the indicator type of the data analysis request. After obtaining the indicator data corresponding to the data analysis request, the execution end can store the indicator data and the corresponding indicator identifier in association.
[0055] Furthermore, the step of analyzing the business data stored in the server according to the priority and the configuration information to obtain the indicator data corresponding to the data analysis request includes:
[0056] Step a: analyzing the business data stored in the server cache database according to the priority and the statistical caliber of the indicators in the configuration information to obtain the indicator data corresponding to the data analysis request.
[0057] Specifically, the execution end analyzes the business data stored in the server cache database according to the priority of each indicator from high to low and the statistical caliber of the indicator in the configuration information to obtain the indicator data corresponding to the data analysis request. If the statistical caliber is to count the total number of people who purchased the A1 sub-product and the A2 sub-product in the A product in 2018, the execution end will first calculate the first number of people who purchased the A1 sub-product in 2018 from the business data stored in the server cache database, and then calculate the second number of people who purchased the A2 sub-product in 2018, calculate the sum of the first number and the second number, and obtain the total number of people who purchased the A1 sub-product and the A2 sub-product in the A product in 2018, that is, obtain the indicator data corresponding to the data analysis request. At this time, there are two indicators corresponding to the data analysis request, namely, the first number of people who purchased the A1 sub-product in 2018 and the second number of people who purchased the A2 sub-product in 2018.
[0058] It should be noted that in the present application, the business data to be analyzed is cached in the cache database of the server, so that when the execution end performs business data analysis, the business data to be analyzed can be quickly obtained from the cache database, thereby improving the efficiency of business data analysis.
[0059] Furthermore, if the obtained indicator data needs to be used for other data analysis requests, the indicator data can be stored in the cache database, and a data analysis request corresponding to the indicator data can be generated in the task scheduling table, so that when the server scans the task scheduling table, the data analysis request corresponding to the indicator data can be scanned and executed.
[0060] This embodiment deploys the server and execution end in a distributed manner in the server, scans the preset task scheduling table in the server, determines the data analysis requests in the task scheduling table that are in a waiting state; determines the priority of the data analysis request in the execution end according to the indicator type corresponding to the data analysis request; extracts the configuration information of the indicator corresponding to the data analysis request, analyzes the business data stored in the server according to the configuration information according to the priority, and obtains the indicator data corresponding to the data analysis request. In the process of analyzing business data, the business data analysis process according to the indicator corresponding to the data analysis request is completed directly in the server and execution end, without coupling the script of the data analysis logic in the code, reducing the cost of business data analysis and improving the maintainability of business data.
[0061] Furthermore, a second embodiment of the indicator-based data analysis method of the present invention is proposed.
[0062] The difference between the second embodiment of the indicator-based data analysis method and the first embodiment of the indicator-based data analysis method is that the indicator-based data analysis method further includes:
[0063] Step b: Detect whether the configuration information of the indicator corresponding to the data analysis request has been cached in the cache database of the server.
[0064] If it is detected that the configuration information is not cached in the cache database, step S20 is executed.
[0065] After the server determines that the data analysis request in the task scheduling table is in a pending state, the server detects whether the configuration information of the indicator corresponding to the data analysis request has been cached in the server's cache database. It should be noted that when the server determines that the data analysis request is in a pending state, the configuration information of the indicator corresponding to the data analysis request will be stored in the server's cache database, so that the execution end can quickly extract the required configuration information from the cache database when the configuration information is needed. If the server detects that the configuration information is not cached in the cache database, the server determines that the data analysis request in the pending state has not been executed, stores the configuration information of the indicator of the data analysis request in the pending state in the cache database, and sends the data analysis request to the execution end, so that the priority of the data analysis request is determined in the execution end according to the indicator type corresponding to the data analysis request; further, if the server detects that the configuration information has been cached in the cache database, it can be determined that the data analysis request in the pending state has been sent to the execution end, and therefore, the data analysis request is no longer sent to the execution end.
[0066] It should be noted that in the embodiment of the present invention, the cache database can be an in-memory database such as H2 database, eXtremeDB (in-memory embedded real-time database), Oracle TimesTen (in-memory database), or it can be replaced by an in-process cache framework such as ehcache (a pure Java in-process cache framework).
[0067] This embodiment avoids sending data analysis requests to the executor repeatedly, thereby improving resource utilization of the server and executor ends by causing the server to first detect whether the configuration information of the indicator corresponding to the data analysis request has been cached in the server's cache database before sending the data analysis request to the executor end.
[0068] Furthermore, a third embodiment of the indicator-based data analysis method of the present invention is proposed.
[0069] The difference between the third embodiment of the indicator-based data analysis method and the first or second embodiment of the indicator-based data analysis method is that, Figure 2 ,Indicator-based data analysis methods also include:
[0070] Step S40, obtaining business data of the upstream system, and aggregating the business data in a preset first database according to the business field and business subject to which the business data belongs, so as to generate a data model table.
[0071] Before executing the data analysis request, it is necessary to process the business data that meets the service end and the execution end on the hive side of the server so that the service end and the execution end can successfully execute the data analysis request. In the embodiment of the present invention, the service end and the execution end can be understood as a computing engine. In the server, a data processing program is pre-set, and the data processing program will obtain the business data of each upstream system and store the obtained business data in the first database in the server. Among them, the first database is pre-set in the server, the first database is a hive database, and the upstream system is a system for conducting business transactions and generating business data, such as a deposit system and a loan system. After the data processing program stores the acquired business data in the first database, the business data is summarized in the first database according to the business field and business theme to which the business data belongs to generate a data model table. Among them, there are different business themes in the same business field, such as in the financial business field, there are deposit business themes, loan business themes, and wealth management business themes, etc. In the terminal business field, there are mobile terminal business fields, fixed terminal business fields, etc.
[0072] The specific process of aggregating the business data in the first database according to the business field and business theme to which the business data belongs and generating the data model table is as follows: first determine the business field to which each business data in the first database belongs, and then determine the business theme to which the business data in the business field belongs, thereby determining the business data of each business field corresponding to the business theme, and then adopt ETL layering technology in each business theme to aggregate and generate the corresponding data model table according to the different dimensions of the business data. For example, a time data model table is generated by aggregating the business data according to the generation time, in which each business data can be displayed from front to back in the order of the generation time; or an amount data model table is generated by aggregating the business data according to the transaction amount, in which each business data can be displayed from small to large according to the size of the transaction finance.
[0073] It should be noted that, in this embodiment, the business data is aggregated according to the business fields and business themes to which the business data belongs, so as to ensure the independence of the business data of each business theme.
[0074] Step S50, storing the business data in the data model table into a preset second database, and storing the business data in the second database corresponding to the data analysis request in the task scheduling table into the cache database of the server.
[0075] After the data model table is generated, the data processing program stores the business data in the data model table in the preset second database, wherein the second database is a database pre-set in the server, and the second database can be a FDM (Financial Data Mart, financial data mart system) MySQL database, in which the business data belonging to the same data model table are stored in association in the second database. It should be noted that the business data in the data model table generated in the first database is stored in the second database so that when the business data needs to be extracted, the required business data can be quickly extracted directly from the second database (relatively speaking, the amount of data stored in the second database is less than the amount of data stored in the first database).
[0076] In order to improve data analysis efficiency, the business data corresponding to the data analysis request in the second database is stored in the cache database of the server, so that the execution end can directly obtain the business data corresponding to the data analysis request in the cache database.
[0077] This embodiment obtains business data from an upstream system, generates a data model table, stores the business data in the data model table in a preset second database, and stores the business data in the second database corresponding to the data analysis request in a cache database of the server, so that the execution end can directly obtain the business data corresponding to the data analysis request in the cache database, thereby improving data analysis efficiency.
[0078] Furthermore, a fourth embodiment of the indicator-based data analysis method of the present invention is proposed.
[0079] The fourth embodiment of the indicator-based data analysis method is different from the first, second or third embodiment of the indicator-based data analysis method in that the indicator-based data analysis method further includes:
[0080] Step c: parsing the data analysis request and detecting whether the data analysis request is parsed successfully.
[0081] If the data analysis request is parsed successfully, step S20 is executed.
[0082] Step d: If the data analysis request fails to be parsed, the state corresponding to the data analysis request is modified to a scheduling failure state.
[0083] After the server determines that the data analysis request is in a pending state, the server parses the data analysis request and detects whether the data analysis request is parsed successfully. Specifically, the server obtains the configuration information of the indicator corresponding to the data analysis request from the cache database, and detects whether the configuration information contains illegal statistical calibers. If the configuration information contains illegal statistical calibers, it is determined that the data analysis request has failed to parse; if the configuration information does not contain illegal statistical calibers, it is detected whether the configuration information includes calculation formulas between indicators. If the configuration information includes calculation formulas between indicators, it is detected whether there are illegal characters in the calculation formula; if there are illegal characters in the calculation formula, it is determined that the data analysis request has failed to parse; if there are no illegal characters in the calculation formula, it is determined that the data analysis request has been parsed successfully. In this embodiment, illegal statistical calibers and illegal characters can be set according to specific needs.
[0084] If the server successfully parses the data analysis request, the server sends the data analysis request to the execution end, so that the execution end determines the priority of the data analysis request according to the indicator type corresponding to the data analysis request. If the server fails to successfully parse the data analysis request, that is, the data analysis request fails to parse, the server changes the status corresponding to the data analysis request from the pending execution status to the scheduling failure status. It can be understood that when the server sends the data analysis request to the execution end, the server will change the status corresponding to the data analysis request from the pending execution status to the scheduling success status; when the execution end obtains the indicator data corresponding to the data analysis request, the execution end will change the status corresponding to the data analysis request from the scheduling success status to the analysis success status. The server will periodically delete the data analysis requests in the task scheduling table that are in the scheduling failure status to improve the scanning efficiency when scanning the task scheduling table.
[0085] Furthermore, if the server determines that the data analysis request has failed to be parsed, and the data analysis request is sent by the client, the server generates a failure message indicating that the data analysis has failed, and sends the failure message to the client. After the client receives the failure message, it outputs the failure message to prompt the client user that the data analysis has failed. In this embodiment, the output method of the failure message is not limited.
[0086] In this embodiment, after the server determines that the data analysis request is in a pending execution state, it parses the data analysis request. If the data analysis request is parsed successfully, the data analysis request is sent to the execution end. If the data analysis request fails to be parsed, the state corresponding to the data analysis request is modified to a scheduling failure state, thereby avoiding sending problematic data analysis requests to the execution end and improving the success rate of the execution end in executing the data analysis request.
[0087] Furthermore, a fifth embodiment of the indicator-based data analysis method of the present invention is proposed.
[0088] The fourth embodiment of the indicator-based data analysis method is different from the first, second, third or fourth embodiment of the indicator-based data analysis method in that: Figure 3 ,Indicator-based data analysis methods also include:
[0089] Step S60, when a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request is detected, the statistical caliber of the indicator corresponding to the data analysis request is set according to the setting instruction to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber.
[0090] When the server detects a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request, the server sets the statistical caliber of the indicator corresponding to the data analysis request according to the setting instruction, so as to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber. It should be noted that an indicator of a data analysis request may correspond to one statistical caliber or multiple statistical calibers. Among them, the setting instruction may be triggered by the client user through its client display interface, or by the server user through the server display interface. After the client accesses the server, the client user may trigger the setting instruction in the client display interface to set the statistical caliber of the indicator corresponding to the data analysis request. Specifically, the server's application may be installed in the client to enable the client to access the server.
[0091] This embodiment achieves flexible configuration of the statistical caliber by setting the statistical caliber of the indicator corresponding to the data analysis request according to the setting instruction.
[0092] Furthermore, a sixth embodiment of the indicator-based data analysis method of the present invention is proposed.
[0093] The fourth embodiment of the indicator-based data analysis method is different from the first, second, third, fourth or fifth embodiment of the indicator-based data analysis method in that the indicator-based data analysis method further includes:
[0094] Step e: Aggregate the indicator data according to preset dimensions to obtain aggregated indicator data, and store the aggregated indicator data.
[0095] When the execution end obtains the indicator data, the indicator data is summarized according to the preset dimensions to obtain the summarized indicator data, and the summarized indicator data is stored. For example, the obtained indicator data is summarized according to the product type to obtain the indicator data of a certain type of product. In this embodiment, there is no specific restriction on the preset dimensions. Specifically, the database in which the summarized indicator data is stored can be pre-set, and in this embodiment, there is no specific restriction on the database for storing the summarized indicator data.
[0096] Further, step e comprises:
[0097] Step e1, aggregating the indicator data according to the institutional dimension to obtain the indicator data aggregated by different institutions.
[0098] Furthermore, the execution end can summarize the obtained indicator data according to the organizational dimension to obtain the indicator data summarized by different organizations. Specifically, in the process of summarizing the indicator data according to the organizational dimension, the indicator data can be summarized according to the superiors and subordinates of the organization, such as summarizing the indicator data of the subordinates of the same organization into the indicator data of the superiors of the organization, and finally obtaining the indicator data of the organization. In this embodiment, each indicator data will have a corresponding organizational identification, and according to the organizational identification, it can be determined which organization the indicator data specifically belongs to, and the organizational level corresponding to the indicator data can also be determined through the organizational identification. If the organizational identification corresponding to the A indicator data is Q1, and the organizational identification corresponding to the B indicator data is Q2, it can be determined that the A indicator data and the B indicator data belong to the same organization Q, but the level corresponding to the B indicator data is greater than the data corresponding to the A indicator data.
[0099] This embodiment aggregates the indicator data according to preset dimensions to obtain aggregated indicator data, and stores the aggregated indicator data so that the aggregated indicator data can be quickly retrieved when the user needs it.
[0100] In addition, refer to Figure 4 The present invention also provides an indicator-based data analysis device, wherein the indicator-based data analysis device is applied to a server, wherein a service end and an execution end are distributedly deployed in the server, and the indicator-based data analysis device comprises:
[0101] A scanning module 10, used to scan a preset task schedule in the server;
[0102] A determination module 20, configured to determine a data analysis request in a pending execution state in the task scheduling table; and to determine a priority of an indicator corresponding to the data analysis request in the execution end according to an indicator type corresponding to the data analysis request;
[0103] An extraction module 30, used to extract configuration information of indicators corresponding to the data analysis request;
[0104] The analysis module 40 is used to analyze the business data stored in the server according to the priority and the configuration information to obtain the indicator data corresponding to the data analysis request.
[0105] Furthermore, the analysis module 40 is also used to analyze the business data stored in the server cache database according to the priority and the statistical caliber of the indicators in the configuration information to obtain the indicator data corresponding to the data analysis request.
[0106] Furthermore, the indicator-based data analysis device also includes:
[0107] A first detection module, used to detect whether the configuration information of the indicator corresponding to the data analysis request has been cached in the cache database of the server;
[0108] The first execution module is used to execute the step of determining the priority of the indicator corresponding to the data analysis request in the execution end according to the indicator type corresponding to the data analysis request if it is detected that the configuration information is not cached in the cache database.
[0109] Furthermore, the indicator-based data analysis device also includes:
[0110] The acquisition module is used to obtain business data from the upstream system;
[0111] A first aggregation module, used to aggregate the business data in a preset first database according to the business field and business subject to which the business data belongs, so as to generate a data model table;
[0112] The first storage module is used to store the business data in the data model table into a preset second database, and store the business data in the second database corresponding to the data analysis request in the task scheduling table into the cache database of the server.
[0113] Furthermore, the indicator-based data analysis device also includes:
[0114] A parsing module, used for parsing the data analysis request;
[0115] A second detection module is used to determine whether the data analysis request is parsed successfully;
[0116] A second execution module, configured to execute, if the data analysis request is parsed successfully, the step of determining, in the execution end, the priority of the indicator corresponding to the data analysis request according to the indicator type corresponding to the data analysis request;
[0117] The modification module is used to modify the state corresponding to the data analysis request to a scheduling failure state if the parsing of the data analysis request fails.
[0118] Furthermore, the indicator-based data analysis device also includes:
[0119] A setting module is used to set the statistical caliber of the indicator corresponding to the data analysis request according to the setting instruction when a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request is detected, so as to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber.
[0120] Furthermore, the indicator-based data analysis device also includes:
[0121] A second aggregation module is used to aggregate the indicator data according to a preset dimension to obtain aggregated indicator data;
[0122] The second storage module is used to store the summarized indicator data.
[0123] Furthermore, the second aggregation module is also used to aggregate the indicator data according to the institutional dimension to obtain indicator data aggregated by different institutions.
[0124] It should be noted that the various embodiments of the indicator-based data analysis device are basically the same as the various embodiments of the above-mentioned indicator-based data analysis method, and will not be described in detail here.
[0125] In addition, the present invention also provides a server. Figure 5 As shown, Figure 5 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.
[0126] It should be noted that Figure 5 That is, it is a structural diagram of the hardware operating environment of the server. The server in the embodiment of the present invention can be a terminal device such as a PC, a portable computer, etc.
[0127] like Figure 5 As shown, a server and an execution end are distributedly deployed in the server, and the server may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0128] Optionally, the server may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
[0129] Those skilled in the art will understand that Figure 5 The server structure shown in the figure does not constitute a limitation on the server, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0130] like Figure 5 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an indicator-based data analysis program. The operating system is a program for managing and controlling server hardware and software resources, and supports the operation of the indicator-based data analysis program and other software or programs.
[0131] exist Figure 5 In the server shown, the user interface 1003 is mainly used to connect to the client and communicate data with the client; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the indicator-based data analysis program stored in the memory 1005, and execute the steps of the indicator-based data analysis method as described above.
[0132] The specific implementation of the server of the present invention is basically the same as the above-mentioned embodiments of the indicator-based data analysis method, and will not be repeated here.
[0133] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which an indicator-based data analysis program is stored. When the indicator-based data analysis program is executed by a processor, the steps of the indicator-based data analysis method described above are implemented.
[0134] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the above-mentioned embodiments of the indicator-based data analysis method, and will not be repeated here.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0136] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0138] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A data analysis method based on indicators, characterized in that: The indicator-based data analysis method is applied to a server, in which a service end and an execution end are distributedly deployed. The indicator-based data analysis method includes the following steps: When a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request is detected, the statistical caliber of the indicator corresponding to the data analysis request is set according to the setting instruction, so as to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber; Scanning a preset task scheduling table in the server to determine a data analysis request in the task scheduling table that is in a pending state; In the execution end, the associated type identifier is determined according to the request identifier of the data analysis request, and the indicator type corresponding to the corresponding data analysis request is determined according to the type identifier; wherein the indicator types include root indicators, combined indicators, derived indicators and general ledger indicators, and the root indicator is composed of all dimensions of the data model plus one of the metrics; the combined indicator is obtained by adding dimension values to several dimension items included in the root indicator; the derived indicator is calculated by several combined indicators according to a certain logical relationship; the general ledger indicator is an indicator for bank general ledger data; Determine the priority of the indicator corresponding to the data analysis request according to the dependency relationship between the indicator types; wherein, if the analysis of the business data corresponding to the first indicator needs to depend on the analysis result of the business data corresponding to the second indicator, the priority of the second indicator is higher than the priority of the first indicator; Extract the configuration information of the indicator corresponding to the data analysis request, analyze the business data stored in the server cache database according to the priority and the statistical caliber of the indicator in the configuration information, and obtain the indicator data corresponding to the data analysis request.
2. The indicator-based data analysis method according to claim 1, characterized in that: After the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the method further includes: Detecting whether configuration information of the indicator corresponding to the data analysis request has been cached in the cache database of the server; If it is detected that the configuration information is not cached in the cache database, the steps of determining the associated type identifier according to the request identifier of the data analysis request in the execution end, determining the indicator type corresponding to the corresponding data analysis request according to the type identifier, and determining the priority of the indicator corresponding to the data analysis request according to the dependency relationship between the indicator types are executed.
3. The indicator-based data analysis method according to claim 1, characterized in that: Before the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the method further includes: Acquire business data of an upstream system, and aggregate the business data in a preset first database according to the business fields and business themes to which the business data belongs, so as to generate a data model table; The business data in the data model table is stored in a preset second database, and the business data in the second database corresponding to the data analysis request in the task scheduling table is stored in a cache database of the server.
4. The indicator-based data analysis method according to claim 1, characterized in that: After the step of scanning the task scheduling table preset in the server to determine the data analysis request in the task scheduling table that is in a pending state, the method further includes: Parsing the data analysis request, and determining whether the data analysis request is parsed successfully; If the data analysis request is parsed successfully, the steps of determining the associated type identifier according to the request identifier of the data analysis request in the execution end, determining the indicator type corresponding to the corresponding data analysis request according to the type identifier, and determining the priority of the indicator corresponding to the data analysis request according to the dependency relationship between the indicator types are executed; If the data analysis request fails to be parsed, the state corresponding to the data analysis request is modified to a scheduling failure state.
5. The indicator-based data analysis method according to any one of claims 1 to 4, characterized in that: After the step of extracting the configuration information of the indicator corresponding to the data analysis request, analyzing the business data stored in the server according to the configuration information according to the priority, and obtaining the indicator data corresponding to the data analysis request, the method further includes: The indicator data are aggregated according to preset dimensions to obtain aggregated indicator data, and the aggregated indicator data are stored.
6. The indicator-based data analysis method according to claim 5, characterized in that: The step of aggregating the indicator data according to the preset dimensions to obtain the aggregated indicator data comprises: The indicator data are aggregated according to the institutional dimension to obtain the indicator data aggregated by different institutions.
7. A data analysis device based on indicators, characterized in that: The indicator-based data analysis device is applied to a server, in which a service end and an execution end are distributedly deployed. The indicator-based data analysis device includes: A setting module, configured to, when a setting instruction for setting the statistical caliber of the indicator corresponding to the data analysis request is detected, set the statistical caliber of the indicator corresponding to the data analysis request according to the setting instruction, so as to determine the configuration information of the indicator corresponding to the data analysis request according to the statistical caliber; A scanning module, used for scanning a preset task schedule in the server; A determination module, used to determine the data analysis request in the task scheduling table that is in a pending execution state; determine the associated type identifier in the execution end according to the request identifier of the data analysis request, and determine the indicator type corresponding to the corresponding data analysis request according to the type identifier; wherein the indicator types include root indicators, combined indicators, derived indicators and general ledger indicators, and the root indicator is composed of all dimensions of the data model plus one of the metrics; the combined indicator is obtained by adding dimension values to several dimension items included in the root indicator; the derived indicator is calculated by several combined indicators according to a certain logical relationship; the general ledger indicator is an indicator for bank general ledger data; determine the priority of the indicator corresponding to the data analysis request according to the dependency relationship between indicator types; wherein, if the analysis of the business data corresponding to the first indicator needs to depend on the analysis result of the business data corresponding to the second indicator, the priority of the second indicator is higher than the priority of the first indicator; An extraction module, used to extract configuration information of indicators corresponding to the data analysis request; The analysis module is used to analyze the business data stored in the server cache database according to the priority and the statistical caliber of the indicators in the configuration information to obtain the indicator data corresponding to the data analysis request.
8. The indicator-based data analysis device according to claim 7, characterized in that: The indicator-based data analysis device also includes: A first detection module, used to detect whether the configuration information of the indicator corresponding to the data analysis request has been cached in the cache database of the server; The first execution module is used to execute the steps of determining the associated type identifier according to the request identifier of the data analysis request in the execution end, and determining the indicator type corresponding to the corresponding data analysis request according to the type identifier, and determining the priority of the indicator corresponding to the data analysis request according to the dependency relationship between the indicator types, if it is detected that the configuration information is not cached in the cache database.
9. The indicator-based data analysis device according to claim 7, characterized in that: The indicator-based data analysis device also includes: The acquisition module is used to obtain business data from the upstream system; A first aggregation module, used to aggregate the business data in a preset first database according to the business field and business subject to which the business data belongs, so as to generate a data model table; The first storage module is used to store the business data in the data model table into a preset second database, and store the business data in the second database corresponding to the data analysis request in the task scheduling table into the cache database of the server.
10. The indicator-based data analysis device according to claim 7, characterized in that: The indicator-based data analysis device also includes: A parsing module, used for parsing the data analysis request; A second detection module is used to determine whether the data analysis request is parsed successfully; A second execution module, for executing the steps of determining the associated type identifier according to the request identifier of the data analysis request in the execution end, determining the indicator type corresponding to the corresponding data analysis request according to the type identifier, and determining the priority of the indicator corresponding to the data analysis request according to the dependency relationship between the indicator types, if the data analysis request is parsed successfully; The modification module is used to modify the state corresponding to the data analysis request to a scheduling failure state if the parsing of the data analysis request fails.
11. A server, characterized in that: The server has a service end and an execution end distributedly deployed therein, and the server includes a memory, a processor, and an indicator-based data analysis program stored in the memory and executable on the processor. When the indicator-based data analysis program is executed by the processor, the steps of the indicator-based data analysis method as described in any one of claims 1 to 6 are implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an indicator-based data analysis program, which, when executed by a processor, implements the steps of the indicator-based data analysis method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Large data analysis system integrating real-time mode and non-real-time mode
CN104794003A
Task processing system, method and apparatus
CN109144744A