Business data processing method and device
By detecting and processing the signal identification of business data and identifying business data with the same calculation caliber, it solves the problem of indicator data lag caused by the complexity of ETL calculation under the database layered architecture, improves the timeliness and accuracy of indicator data, and meets the needs of BI project needs.
Patent Information
- Application Number
- CN201910864379.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-12
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-09-12
AI Technical Summary
The ETL calculation process carried out layer by layer under the existing database hierarchical architecture is relatively complex and tedious, resulting in lags in indicator data analysis and later display, which cannot meet the timeliness and accuracy required by BI projects.
Determine the calculation completion status by detecting the signal identification of the target business, calculate indicator data based on the business data, and identify business data with the same calculation caliber to calculate the indicator data of the target business in a targeted manner to improve the timeliness and accuracy of the data. sex.
It solves the data redundancy problem in the ETL calculation process under the database layered architecture, avoids the lag in indicator data analysis and display, and meets the timeliness and accuracy requirements of BI projects for indicator data.
Smart Images

Figure CN110781161B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method and device for processing business data. Background Art
[0002] In the existing technology, the database ETL (full name is Extract-Transform-Load) process is the process of extracting, cleaning and transforming the data of the business system and then loading it into the data warehouse. The purpose is to integrate the scattered, messy and non-standard data in the enterprise and provide an analytical basis for the enterprise's decision-making. ETL is an important part of the BI (full name is Business Intelligence) project. Usually, ETL will take at least 1 / 3 of the time of the entire project in a BI project. Therefore, the quality of ETL design is directly related to the success or failure of the BI project.
[0003] At present, the ETL process of database products in the industry is carried out layer by layer under the database hierarchical architecture. The same is true for the data ETL process of the early version of monitoring and analysis. Among them, the data of the monitoring and analysis system flows from the source data to the browser display, which is divided into four steps: the first step is to extract and clean the data from the external source data into the data warehouse DW (full name Data Warehouse) wide table; the second step is to extract and clean the data from the DW wide table into the DM (full name Data Mart) data model layer; the third step is to extract the summary data from the DM data model layer to the indicator model layer; the fourth step is to transfer the data from the indicator model layer to the front-end page through the data interface and display it.
[0004] The ETL calculation process performed layer by layer under the existing database hierarchical architecture is relatively complex and cumbersome, resulting in a certain lag in indicator data analysis and subsequent display, and is unable to meet the technical issues such as the timeliness and accuracy of indicator data required by BI projects.
[0005] With respect to the above-mentioned problems existing in the prior art, no effective solution has been found so far. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for processing business data, so as to at least solve the technical problems that the ETL calculation process performed layer by layer under the database hierarchical architecture in the prior art is relatively complicated and cumbersome, resulting in a certain lag in indicator data analysis and subsequent display, and failing to meet the timeliness and accuracy of indicator data required by BI projects.
[0007] According to one embodiment of the present invention, a method for processing business data is provided, comprising: calculating business data of a target business; detecting a first signal identifier of the target business, wherein the first signal identifier is used to indicate whether calculation of the business data is completed; and when the first signal identifier is in a specified state, calculating indicator data of the target business based on the business data, wherein the indicator data is composed of a plurality of business data.
[0008] Optionally, calculating the business data of the target business includes: detecting second signal identifiers of multiple sub-businesses, wherein the second signal identifier is used to indicate whether the sub-business data of the sub-business is calculated, and the target business consists of the multiple sub-businesses; when the second signal identifiers of the multiple sub-businesses are all in a specified state, calculating the business data of the target business based on the sub-business data.
[0009] Optionally, before detecting the second signal identifier of multiple sub-businesses, the method also includes: decomposing the target business into multiple sub-businesses according to preset rules, wherein the multiple sub-businesses have the same business calculation caliber as the target business, the multiple sub-businesses are located in a data warehouse DW wide table, and the target business is located in a data mart DM; setting the same type of signal identifier for the target business and the multiple sub-businesses.
[0010] Optionally, after calculating the service data of the target service, the method further includes: updating the first signal identifier of the target service to a specified state, and transmitting the service data of the target service to a service indicator layer.
[0011] Optionally, before calculating the business data of the target business based on the sub-business data, the method also includes: receiving a settlement bill in a DW wide table; counting multiple sub-business data of the multiple sub-businesses according to the bill categories of the settlement bill; when the calculation of the sub-business data of a first sub-business is completed, updating the second signal identifier of the first sub-business to a specified state, wherein the first sub-business is any sub-business among the multiple sub-businesses; detecting the second signal identifiers of the multiple sub-businesses; when it is detected that the second signal identifier of the second sub-business is not in the specified state, cyclically detecting the second signal identifier of the second sub-business according to a preset period until the second signal identifier of the second sub-business is updated to the specified state.
[0012] Optionally, after calculating the indicator data of the target business, the method further includes: transmitting the indicator data of the target business to a page display layer through a data interface; and displaying the indicator data on the page display layer.
[0013] Optionally, calculating the indicator data of the target business based on the business data includes one of the following: counting the business data of multiple target businesses to obtain indicator data of a first indicator; determining the business data of one target business as indicator data of a second indicator; decomposing the business data of one target business into first business data and second business data according to a business calculation caliber, and determining the first business data and the second business data as indicator data of a third indicator and indicator data of a fourth indicator, respectively.
[0014] According to one embodiment of the present invention, a business data processing device is provided, comprising: a first calculation module, used to calculate business data of a target business; a first detection module, used to detect a first signal identifier of the target business, wherein the first signal identifier is used to indicate whether the business data has been calculated; and a second calculation module, used to calculate indicator data of the target business based on the business data when the first signal identifier is in a specified state, wherein the indicator data is composed of a plurality of business data.
[0015] Optionally, the first calculation module includes: a detection unit, used to detect second signal identifiers of multiple sub-businesses, wherein the second signal identifier is used to indicate whether the sub-business data of the sub-business has been calculated, and the target business is composed of the multiple sub-businesses; and a calculation unit, used to calculate the business data of the target business based on the sub-business data when the second signal identifiers of the multiple sub-businesses are all in a specified state.
[0016] Optionally, the device also includes: a decomposition module, used to decompose the target business into multiple sub-businesses according to preset rules before the detection unit detects the second signal identifier of the multiple sub-businesses, wherein the multiple sub-businesses have the same business calculation caliber as the target business, the multiple sub-businesses are located in the data warehouse DW wide table, and the target business is located in the data mart DM; a setting module, used to set the same type of signal identifier for the target business and the multiple sub-businesses.
[0017] Optionally, the device also includes: a first update module, used to update the first signal identifier of the target business to a specified state after the calculation module calculates the business data of the target business; and a first transmission module, used to transmit the business data of the target business to a business indicator layer.
[0018] Optionally, the device also includes: a receiving module, used to receive a settlement bill in the DW wide table before the calculation unit calculates the business data of the target business based on the sub-business data; a statistical module, used to count the multiple sub-business data of the multiple sub-businesses according to the bill categories of the settlement bill; a second update module, used to update the second signal identifier of the first sub-business to a specified state when the calculation of the sub-business data of the first sub-business is completed, wherein the first sub-business is any sub-business among the multiple sub-businesses; a second detection module, used to detect the second signal identifier of the multiple sub-businesses; and a third detection module, used to cyclically detect the second signal identifier of the second sub-business according to a preset period when it is detected that the second signal identifier of the second sub-business is not in the specified state until the second signal identifier of the second sub-business is updated to the specified state.
[0019] Optionally, the device also includes: a second transmission module, used to transmit the indicator data of the target business to the page display layer through a data interface after calculating the indicator data of the target business; and a display module, used to display the indicator data on the page display layer.
[0020] Optionally, the second calculation module includes one of the following: a statistical unit, used to count the business data of multiple target businesses to obtain indicator data of the first indicator; a first determination unit, used to determine the business data of one of the target businesses as the indicator data of the second indicator; a second determination unit, used to decompose the business data of one of the target businesses into first business data and second business data according to the business calculation caliber, and determine the first business data and the second business data as the indicator data of the third indicator and the indicator data of the fourth indicator, respectively.
[0021] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0022] According to another embodiment of the present invention, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0023] Through the present invention, after calculating the business data of the target business, by detecting the display status of the signal identifier of the target business, it is determined whether the target business has been calculated; and when the first signal identifier is in a specified state, the indicator data of the target business is calculated according to the business data. By marking the signal identifier of the target business, the business data with the same calculation caliber is identified, and then the indicator data of the target business is calculated in a targeted manner, which can improve the timeliness and accuracy of obtaining the required indicator data, solve the technical problem of data redundancy in the ETL calculation process performed layer by layer under the database hierarchical architecture in the prior art, avoid the lag in indicator data analysis and subsequent display, and meet the timeliness and accuracy of indicator data required by BI projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 It is a hardware structure block diagram of a method for processing business data according to an embodiment of the present invention applied to a computer terminal;
[0026] Figure 2 It is a database hierarchical architecture diagram of a business data processing application provided by the present invention;
[0027] Figure 3 is a flowchart of a method for processing business data according to an embodiment of the present invention;
[0028] Figure 4 It is a diagram of a hierarchical database architecture after business data identification provided according to a specific embodiment of the present invention;
[0029] Figure 5 It is a structural block diagram of a device for processing business data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] Example 1
[0033] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a server, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a method for processing business data according to an embodiment of the present invention applied to a computer terminal. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the Chinese text recognition method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0036] In this embodiment, a method for processing business data is provided, and the database hierarchical architecture used is as follows: Figure 2 As shown, Figure 2It is a database hierarchical architecture diagram of the business data processing application provided according to the present invention.
[0037] Figure 3 is a flowchart of a method for processing business data according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0038] Step S302, calculating the business data of the target business;
[0039] In this embodiment, the business data of the target business is calculated by triggering the ETL calculation program.
[0040] Step S304, detecting a first signal identifier of the target service, wherein the first signal identifier is used to indicate whether the service data calculation is completed;
[0041] In this embodiment, when the business data of the target business is calculated, the identification state of the signal identification corresponding to the target business is changed to a specified state through a timed scanning program, such as the specified state is the ready state. If the business data of the target business is not calculated, it is set to the prepared state.
[0042] Step S306, when the first signal is identified as a specified state, calculate the index data of the target service according to the service data, wherein the index data is composed of a plurality of service data.
[0043] Through the above steps, after calculating the business data of the target business, the display status of the signal identifier of the target business is detected to determine whether the target business has been calculated; and when the first signal identifier is in the specified state, the indicator data of the target business is calculated according to the business data. By marking the signal identifier of the target business, the business data with the same calculation caliber can be identified, and then the indicator data of the target business can be calculated in a targeted manner, which can improve the timeliness and accuracy of obtaining the required indicator data, solve the technical problem of data redundancy in the ETL calculation process performed layer by layer under the database hierarchical architecture in the prior art, avoid the lag in indicator data analysis and subsequent display, and meet the timeliness and accuracy of indicator data required by BI projects.
[0044] In an optional embodiment, calculating the business data of the target business includes: detecting the second signal identifiers of multiple sub-businesses, wherein the second signal identifier is used to indicate whether the sub-business data of the sub-business has been calculated, and the target business consists of multiple sub-businesses; when the second signal identifiers of multiple sub-businesses are all in a specified state, calculating the business data of the target business based on the sub-business data.
[0045] According to the above embodiment, before calculating the business data of the target business, it is first checked whether the sub-business data of the sub-business of the target business has been calculated. After the sub-business data of the sub-business of the target business have been calculated and the sub-business data have been inserted into the database, ETL can be triggered to extract all sub-business data into the DM data model layer, thereby calculating the business data in the DM data model.
[0046] Preferably, before detecting the second signal identifier of multiple sub-businesses, it also includes: decomposing the target business into multiple sub-businesses according to preset rules, wherein the multiple sub-businesses and the target business have the same business calculation caliber, the multiple sub-businesses are located in the data warehouse DW wide table, and the target business is located in the data mart DM; setting the same type of signal identifier for the target business and the multiple sub-businesses. In this embodiment, since in the prior art, when calculating the target business in the data mart DM layer, all sub-businesses in the data warehouse DW wide table need to be calculated before the calculation processing in the DM layer can be performed, and for a single target business, it only requires the business data of several businesses in the DW layer. If it is necessary to wait for other unnecessary business data to be calculated, it will obviously increase the calculation load and the calculation efficiency is also low. By adding signal identifiers to businesses with the same logical calculation caliber through this solution, not only can the specified target business be calculated in a targeted manner, but there is no need to wait for the calculation of other sub-businesses to be completed, which greatly shortens the calculation time of a single indicator.
[0047] In an optional example, the target business is decomposed according to the business calculation caliber to obtain several sub-businesses. Therefore, the target business and the sub-business have the same business calculation caliber, and then the target business and the sub-business are marked with the same type of signal identifier. For example, the total outpatient cost (i.e., the target business) = outpatient self-paid expenses (i.e., sub-business 1) + outpatient pooling fund (i.e., sub-business 2) + outpatient self-paid expenses (i.e., sub-business 3), and the total outpatient cost is decomposed according to the logical calculation caliber, where the total outpatient cost is located in the data set DM, and the sub-businesses "outpatient self-paid expenses", "outpatient pooling fund", and "outpatient self-paid expenses" are obtained, and the same type of data signal identifiers are added to the business data "outpatient total expenses, outpatient self-paid expenses, outpatient pooling fund, outpatient self-paid expenses", such as a0, a1, a2, and a3.
[0048] Optionally, after calculating the business data of the target business, the method further includes: updating the first signal identifier of the target business to a specified state, and transmitting the business data of the target business to the business indicator layer. In this embodiment, after calculating the business data of the target business, the timing scanning program changes the signal identifier of the target business, extracts the business data to the indicator layer, and triggers the calculation of the indicator data of the indicator layer, so that the indicator data can be calculated in the first time.
[0049] In an optional example, before calculating the business data of the target business based on the sub-business data, it also includes: receiving a settlement bill in the DW wide table; counting multiple sub-business data of multiple sub-businesses according to the bill categories of the settlement bill; when the sub-business data of the first sub-business is calculated, updating the second signal identifier of the first sub-business to a specified state, wherein the first sub-business is any sub-business among the multiple sub-businesses; detecting the second signal identifiers of the multiple sub-businesses; when it is detected that the second signal identifier of the second sub-business is not in the specified state, cyclically detecting the second signal identifier of the second sub-business according to a preset period until the second signal identifier of the second sub-business is updated to the specified state.
[0050] In this embodiment, a preset period is set to cyclically detect the signal identifiers of services in the DW wide table. When the signal identifiers of all sub-services with the same type of signal identifiers are updated to a specified state, such as a ready state, the ETL calculation of the next layer can be triggered.
[0051] Optionally, after calculating the target business's indicator data, the method further includes: transmitting the target business's indicator data to the page display layer through the data interface; and displaying the indicator data on the page display layer. In this embodiment, the indicator data finally calculated is reflected in real time to the user display layer for display, and through the above embodiment, the display time of the indicator data on the page display layer is greatly shortened.
[0052] Optionally, calculating the index data of the target business based on the business data includes one of the following: counting the business data of multiple target businesses to obtain the index data of the first index; determining the business data of a target business as the index data of the second index; decomposing the business data of a target business into the first business data and the second business data according to the business calculation caliber, and determining the first business data and the second business data as the index data of the third index and the index data of the fourth index respectively. In this implementation, the above embodiments can realize the calculation of the index data of multiple target businesses corresponding to a single index business, or a single target business corresponding to a single index business, or a single target business corresponding to multiple index businesses.
[0053] like Figure 4 As shown, Figure 4 This is a diagram of a database hierarchical architecture after business data identification according to a specific embodiment of the present invention. The technical solution provided by the present invention is further described below in conjunction with a specific embodiment:
[0054] This program includes the following steps:
[0055] S401: Split the target business data according to the business logic to obtain multiple sub-business data; identify the target business data and the multiple sub-business data;
[0056] The developer splits a certain business data in the DM model layer according to the agreed business logic caliber to obtain multiple sub-business data, and identifies the target business data and all its sub-business data; wherein, the identifiers of the business data and its sub-business data are identifiers of the same type. For example, based on the logical calculation caliber of the total outpatient cost "total outpatient cost = outpatient self-paid cost + outpatient pooling fund + outpatient self-paid cost", the same type of data signal identifiers a0, a1, a2, a3 are added to "total outpatient cost", "outpatient self-paid cost", "outpatient pooling fund" and "outpatient self-paid cost" respectively.
[0057] S402: cyclically detecting the identification status of multiple sub-service data, and when detecting that the identification status of all sub-service data is in the ready state, changing the signal identification of the target service data;
[0058] When extracting and cleaning the business data in the DW wide table, the timing scanning program is used to periodically cycle and detect the identification status of the sub-business data in the DW wide table. There are two identification states of business data: one is the ready state, which means that the sub-business data has been calculated and inserted into the corresponding list of the database and is in a waiting state; the other state is the prepared state, which means that the sub-business data has not been calculated yet and has not been stored in the database, that is, the sub-business data cannot be used directly;
[0059] After a single sub-business data is calculated and inserted into the database, the timing scanning program triggers the identification state of the sub-business data to change from the prepared state to the ready state. The timing scanning program will detect the identification states corresponding to all sub-businesses in the DW layer (such as the states of a1, a2, and a3) according to a preset period (for example, 30 seconds). Assuming that the timing scanning program detects that a1 and a2 are in the ready state (that is, the outpatient self-paid expenses and outpatient pooling fund expenses are calculated and inserted into the data), and a3 is still in the prepared state (that is, the outpatient self-paid expenses have not yet been calculated and have not been entered into the database), the timing scanning program will continue to scan according to the preset period until it is detected that a3 is also in the ready state. In other words, after all the sub-business data represented by a1, a2, and a3 are calculated and inserted into the database, the timing scanning program can operate to convert the a0 state of the target business data in the DM layer from the prepared state to the ready state, and automatically trigger the ETL calculation program of the outpatient total expenses (that is, the target business data) (that is, the outpatient total expenses are calculated and incorporated into the database).
[0060] S403: When the identification state of the target service data is the first state, calculate the target service data.
[0061] 1) For a single indicator (the target indicator data corresponding to a single target business data in the indicator layer). The time from processing to display of this indicator S (total outpatient expenses) = S1 + S (outpatient self-paid expenses) + S (outpatient pooling fund) + S (outpatient self-paid expenses) + S4. After the DW wide surface layer detects that the identification status of all sub-business data is ready, it will trigger ETL to extract all sub-business data into the DM data model layer. The DM layer does not perform composite calculations of indicators. The DM data model layer divides the various sub-business data of the DW wide surface layer into themes (that is, they have the same logical calculation caliber). It extracts indicators by theme. Composite calculation (refers to calculating sub-businesses with the same logical caliber) The sum of the data, such as the calculation of the total outpatient cost) is performed in the indicator layer, which is to divide each layer of data vertically into various indicators. When the calculation of each indicator is completed, the lower-level calculation of the indicator can be entered (the lower level refers to the page display layer) without waiting for other indicators of the indicator layer (that is, business data of other topics (for example, after the total outpatient cost is calculated, the ETL calculation of the page display layer can be entered, and there is no need to wait for the calculation of the per capita commodity cost to be completed before starting the ETL calculation of the page display layer)). The calculation is completed before starting the lower-level calculation, which greatly shortens the calculation time and display time of a single indicator.
[0062] 2) Dimensions for multiple indicators. Because the ETL process can be multi-threaded, all indicators can be calculated in parallel, and the time from processing to display of all indicators S (all indicators) = S1 + S (MAX (S2.1, S2.2, S2.3, ...)) + S (MAX (S3.1, S3.2, S3.3, ...)) + S4. Among them, MAX (S2.1, S2.2, S2.3, ...) refers to the maximum value of the calculation time of all sub-business data (such as outpatient self-paid expenses, outpatient pooling funds, ...) in the DW layer extracted and cleaned to a single sub-business data in the DM layer, and MAX (S3.1, S3.2, S3.3, ...) refers to the maximum value of the calculation time of all target business data from extraction and cleaning to a single indicator in the indicator layer. When the calculation of each type of indicator is completed, the lower-level calculation of the indicator of that type can be entered without waiting for the calculation of other types of indicators in that layer to be completed before starting the lower-level calculation, which greatly shortens the calculation time and display time of all indicators.
[0063] S404: Displaying indicator data on the page display layer;
[0064] After the target business data is calculated, the calculation results are transferred from the indicator model layer to the front-end page through the data interface for display. For example, if a single indicator needs to be displayed, the indicator value of the single indicator is calculated and then summarized to the page display layer for display; if all indicators need to be displayed, the indicator values of all indicators are calculated and then summarized to the page display layer for display.
[0065] Example 2
[0066] In the present embodiment, a processing device for business data is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions have been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0067] Figure 5 is a structural block diagram of a device for processing service data according to an embodiment of the present invention. Figure 5 As shown, the device includes: a first calculation module 502, used to calculate the business data of the target business; a first detection module 504, used to detect the first signal identifier of the target business, wherein the first signal identifier is used to indicate whether the business data calculation is completed; a second calculation module 506, used to calculate the indicator data of the target business according to the business data when the first signal identifier is in a specified state, wherein the indicator data is composed of a plurality of business data.
[0068] Optionally, the first calculation module 502 includes: a detection unit, used to detect second signal identifiers of multiple sub-businesses, wherein the second signal identifier is used to indicate whether the sub-business data of the sub-business has been calculated, and the target business is composed of multiple sub-businesses; a calculation unit, used to calculate the business data of the target business based on the sub-business data when the second signal identifiers of the multiple sub-businesses are all in a specified state.
[0069] Optionally, the above-mentioned device also includes: a decomposition module, which is used to decompose the target business into multiple sub-businesses according to preset rules before the detection unit detects the second signal identifier of the multiple sub-businesses, wherein the multiple sub-businesses have the same business calculation caliber as the target business, the multiple sub-businesses are located in the data warehouse DW wide table, and the target business is located in the data mart DM; a setting module, which is used to set the same type of signal identifier for the target business and the multiple sub-businesses.
[0070] Optionally, the above-mentioned device also includes: a first update module, used to update the first signal identifier of the target business to a specified state after the calculation module calculates the business data of the target business; and a first transmission module, used to transmit the business data of the target business to the business indicator layer.
[0071] Optionally, the above-mentioned device also includes: a receiving module, used to receive a settlement bill in the DW wide table before the calculation unit calculates the business data of the target business based on the sub-business data; a statistical module, used to count multiple sub-business data of multiple sub-businesses according to the bill categories of the settlement bill; a second update module, used to update the second signal identifier of the first sub-business to a specified state when the sub-business data calculation of the first sub-business is completed, wherein the first sub-business is any sub-business among the multiple sub-businesses; a second detection module, used to detect the second signal identifiers of multiple sub-businesses; a third detection module, used to cyclically detect the second signal identifier of the second sub-business according to a preset period when it is detected that the second signal identifier of the second sub-business is not in the specified state until the second signal identifier of the second sub-business is updated to the specified state.
[0072] Optionally, the above-mentioned device also includes: a second transmission module, which is used to transmit the indicator data of the target business to the page display layer through the data interface after calculating the indicator data of the target business; and a display module, which is used to display the indicator data on the page display layer.
[0073] Optionally, the second calculation module 506 includes one of the following: a statistical unit, used to count the business data of multiple target businesses to obtain indicator data of the first indicator; a first determination unit, used to determine the business data of a target business as indicator data of the second indicator; a second determination unit, used to decompose the business data of a target business into first business data and second business data according to the business calculation caliber, and determine the first business data and the second business data as indicator data of the third indicator and indicator data of the fourth indicator, respectively.
[0074] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0075] Example 3
[0076] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0077] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0078] S1, calculate the business data of the target business;
[0079] S2, detecting a first signal identifier of the target service, wherein the first signal identifier is used to indicate whether the service data is calculated;
[0080] S3: When the first signal is identified as a specified state, calculate the index data of the target service according to the service data, wherein the index data is composed of a plurality of service data.
[0081] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0082] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0083] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0084] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0085] S1, calculate the business data of the target business;
[0086] S2, detecting a first signal identifier of the target service, wherein the first signal identifier is used to indicate whether the service data is calculated;
[0087] S3: When the first signal is identified as a specified state, calculate the index data of the target service according to the service data, wherein the index data is composed of a plurality of service data.
[0088] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0089] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing business data, characterized in that: include: Calculate business data of target business; Detecting a first signal identifier of the target service, wherein the first signal identifier is used to indicate whether the service data has been calculated; When the first signal is identified as a specified state, calculating the indicator data of the target service according to the service data, wherein the indicator data is composed of a plurality of service data, and the specified state is used to represent a ready state; The business data of the target business to be calculated includes: Detecting second signal identifiers of multiple sub-services, wherein the second signal identifier is used to indicate whether sub-service data of the sub-service is calculated, and the target service is composed of the multiple sub-services; When the second signal identifiers of the plurality of sub-services are all in a specified state, calculating the service data of the target service according to the sub-service data; Before calculating the service data of the target service according to the sub-service data, the method further includes: Receive settlement bills in DW wide table; respectively collecting statistics of the plurality of sub-business data of the plurality of sub-businesses according to the bill categories of the settlement bill; When the calculation of the sub-service data of the first sub-service is completed, updating the second signal identifier of the first sub-service to a specified state, wherein the first sub-service is any sub-service among the multiple sub-services; Detecting second signal identifiers of the multiple sub-services; When it is detected that the second signal identifier of the second sub-service is not in the specified state, the second signal identifier of the second sub-service is cyclically detected according to a preset period until the second signal identifier of the second sub-service is updated to the specified state.
2. The method according to claim 1, characterized in that: Before detecting the second signal identifiers of the plurality of sub-services, the method further includes: Decompose the target business into multiple sub-businesses according to preset rules, wherein the multiple sub-businesses have the same business calculation caliber as the target business, the multiple sub-businesses are located in the data warehouse DW wide table, and the target business is located in the data mart DM; The target service and the multiple sub-services are provided with signal identifiers of the same type.
3. The method according to claim 1, characterized in that After calculating the business data of the target business, the method further includes: The first signal identifier of the target service is updated to a specified state, and the service data of the target service is transmitted to the service indicator layer.
4. The method according to claim 1, characterized in that: After calculating the indicator data of the target business, the method further includes: Transmitting the target business's indicator data to the page display layer through the data interface; The indicator data is displayed on the page presentation layer.
5. The method according to claim 1, characterized in that Calculating the indicator data of the target business according to the business data includes one of the following: Counting the business data of the plurality of target businesses to obtain indicator data of the first indicator; Determining business data of one of the target businesses as indicator data of a second indicator; The business data of the target business is decomposed into first business data and second business data according to the business calculation caliber, and the first business data and the second business data are respectively determined as the indicator data of the third indicator and the indicator data of the fourth indicator.
6. A device for processing business data, characterized in that: include: A first calculation module, used to calculate the business data of the target business; A first detection module, used to detect a first signal identifier of the target service, wherein the first signal identifier is used to indicate whether the service data is calculated; a second calculation module, configured to calculate the index data of the target service according to the service data when the first signal is identified as a specified state, wherein the index data is composed of a plurality of service data, and the specified state is used to represent a ready state; The first calculation module includes: a detection unit, configured to detect second signal identifiers of a plurality of sub-services, wherein the second signal identifier is used to indicate whether sub-service data of the sub-service is calculated, and the target service is composed of the plurality of sub-services; A calculation unit, configured to calculate the service data of the target service according to the sub-service data when the second signal identifiers of the plurality of sub-services are all in a specified state; The device further comprises: a receiving module, which is used to receive a settlement bill in a DW wide table before the calculation unit calculates the service data of the target service according to the sub-service data; A statistics module, used for respectively counting the multiple sub-business data of the multiple sub-businesses according to the bill categories of the settlement bill; A second updating module, configured to update a second signal identifier of a first sub-service to a specified state when calculation of sub-service data of the first sub-service is completed, wherein the first sub-service is any sub-service among the multiple sub-services; A second detection module, used to detect second signal identifiers of the multiple sub-services; The third detection module is used to cyclically detect the second signal identifier of the second sub-service according to a preset period when detecting that the second signal identifier of the second sub-service is not in a specified state, until the second signal identifier of the second sub-service is updated to a specified state.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
