Data processing method, apparatus and terminal device
By using computed views in the SAP HANA database to process data sets, the problem of low data processing efficiency in existing technologies is solved, achieving more efficient data processing and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PEOPLE'S INSURANCE COMPANY OF CHINA
- Filing Date
- 2023-06-08
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the data processing efficiency for the current and historical periods is low when generating business reports in the SAP HANA database, resulting in high resource consumption and long processing time.
By using computed views in the SAP HANA database to process the first and second data sets, including filling, accumulating, and merging processes, a target data set is generated, and a target report is generated through the second computed view, reducing real-time calculations at the application level.
It improved the efficiency of data processing, reduced resource consumption, and shortened processing time.
Smart Images

Figure CN116483839B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to a data processing method, apparatus and terminal device. Background Technology
[0002] Enterprises can classify and process the data generated during business transactions to obtain corresponding business reports.
[0003] In related technologies, business data can be processed and reports generated in the following way: Using an in-memory computing platform (System Applications and Products High-Performance Analytic Appliance, SAP HANA) database that supports both on-premises and cloud deployment modes, pre-configured standard algorithms within the SAP HANA database can process multiple business data points according to preset time periods to generate business reports. These reports can include multiple business data points from the current and historical time periods. However, in this process, because the multiple business data points from the current and historical time periods need to be calculated in real-time at the application level of the SAP HANA database through enhanced variable programs when generating reports, the data processing efficiency is relatively low. Summary of the Invention
[0004] This application provides a data processing method, apparatus, and terminal device to solve the problem of low data processing efficiency.
[0005] In a first aspect, embodiments of this application provide a data processing method, including:
[0006] Obtain a data processing request, the data processing request including multiple fields and a statistical time period, the statistical time period including multiple sub-time periods, the multiple sub-time periods including the current sub-time period;
[0007] According to the data processing request, a first data set and a second data set are obtained from the SAP HANA database, an in-memory computing platform that supports enterprise on-premises deployment and cloud deployment modes. The first data set includes business data for each field within at least one sub-period, and the second data set includes business data for each field within a historical reference period.
[0008] The first data set and the second data set are processed through the first calculation view to obtain the target data set. The target data set includes business data for each field in multiple target time periods. The multiple target time periods include the current sub-time period, the statistical time period, and the historical reference time period.
[0009] The target report corresponding to the target data set is generated through the second calculation view.
[0010] In one possible implementation, the first data set and the second data set are processed to obtain a target data set, including:
[0011] The first data set is filled to obtain a first filled data set;
[0012] The multiple business data in the first filling data set are accumulated to obtain the first accumulated data set;
[0013] The first accumulated data set and the second data set are merged to obtain the target data set.
[0014] In one possible implementation, the first data set is padded to obtain a first padded data set, including:
[0015] For any given field, determine the blank sub-period corresponding to the field among the plurality of sub-periods, wherein the first data set does not include the business data of the field within the blank sub-period;
[0016] The first data set is filled based on the blank sub-period corresponding to each field to obtain the first filled data set.
[0017] In one possible implementation, the first data set is filled according to the blank sub-period corresponding to each field to obtain the first filled data set, including:
[0018] For any given field, the business data of that field in the blank sub-period is determined as a preset value, and the corresponding fill data for that field is obtained. The fill data includes the field, the blank sub-period, and the preset value.
[0019] Add the corresponding fill data for each field to the first data set to obtain the first fill data set.
[0020] In one possible implementation, multiple business data in the first filling data set are accumulated to obtain a first accumulated data set, including:
[0021] For any field in the first data set to be filled, the business data of the field in each sub-period are accumulated to obtain multiple first accumulated data corresponding to the field;
[0022] Generate the first accumulated data set based on the multiple first accumulated data corresponding to each field.
[0023] In one possible implementation, the first accumulated data set is generated based on the first accumulated data corresponding to each field, including:
[0024] For any given field, the multiple first accumulated data are summed to obtain the second accumulated data;
[0025] The first accumulated data set is generated based on the second accumulated data corresponding to each field and the first accumulated data corresponding to the current sub-period.
[0026] In one possible implementation, generating a target report corresponding to the target data set via a second computational view includes:
[0027] The target data set is obtained by performing a database connection operation on the target data set using the second computational graph;
[0028] The target connection set is used to generate a target report corresponding to the target data set according to a preset format.
[0029] In one possible implementation, the method further includes:
[0030] Obtain a data query request, which includes a target field and a target time period;
[0031] In the target report, at least one target data corresponding to the data query request is identified;
[0032] Based on the at least one target data, generate query results and display the query results.
[0033] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0034] The first acquisition module is used to acquire a data processing request, the data processing request including multiple fields and a statistical time period, the statistical time period including multiple sub-time periods, and the multiple sub-time periods including the current sub-time period;
[0035] The second acquisition module is used to acquire a first data set and a second data set from the SAP HANA database, an in-memory computing platform that supports enterprise pre-deployment and cloud deployment modes, according to the data processing request. The first data set includes business data for each field in at least one sub-period, and the second data set includes business data for each field in a historical reference period.
[0036] The processing module is used to process the first data set and the second data set through a first calculation view to obtain a target data set. The target data set includes business data for each field in multiple target time periods, and the multiple target time periods include the current sub-time period, the statistical time period, and the historical reference time period.
[0037] The generation module is used to generate a target report corresponding to the target data set through the second calculation view.
[0038] In one possible implementation, the processing module is specifically used for:
[0039] The first data set is filled to obtain a first filled data set;
[0040] The multiple business data in the first filling data set are accumulated to obtain the first accumulated data set;
[0041] The first accumulated data set and the second data set are merged to obtain the target data set.
[0042] In one possible implementation, the processing module is specifically used for:
[0043] For any given field, determine the blank sub-period corresponding to the field among the plurality of sub-periods, wherein the first data set does not include the business data of the field within the blank sub-period;
[0044] The first data set is filled based on the blank sub-period corresponding to each field to obtain the first filled data set.
[0045] In one possible implementation, the processing module is specifically used for:
[0046] For any given field, the business data of that field in the blank sub-period is determined as a preset value, and the corresponding fill data for that field is obtained. The fill data includes the field, the blank sub-period, and the preset value.
[0047] Add the corresponding fill data for each field to the first data set to obtain the first fill data set.
[0048] In one possible implementation, the processing module is specifically used for:
[0049] For any field in the first data set to be filled, the business data of the field in each sub-period are accumulated to obtain multiple first accumulated data corresponding to the field;
[0050] Generate the first accumulated data set based on the multiple first accumulated data corresponding to each field.
[0051] In one possible implementation, the processing module is specifically used for:
[0052] For any given field, the multiple first accumulated data are summed to obtain the second accumulated data;
[0053] The first accumulated data set is generated based on the second accumulated data corresponding to each field and the first accumulated data corresponding to the current sub-period.
[0054] In one possible implementation, the generation module is specifically used for:
[0055] The target data set is obtained by performing a database connection operation on the target data set using the second computational graph;
[0056] The target connection set is used to generate a target report corresponding to the target data set according to a preset format.
[0057] In one possible implementation, the device further includes a query module.
[0058] The query module is used for:
[0059] Obtain a data query request, which includes a target field and a target time period;
[0060] In the target report, at least one target data corresponding to the data query request is identified;
[0061] Based on the at least one target data, generate query results and display the query results.
[0062] Thirdly, embodiments of this application provide a terminal device, including:
[0063] At least one processor; and
[0064] A memory communicatively connected to the at least one processor; wherein,
[0065] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the first aspects.
[0066] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in any one of the first aspects.
[0067] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.
[0068] The data processing method, apparatus, and terminal device provided in this application embodiment obtain a data processing request. Based on the data processing request, a first data set and a second data set are obtained from the SAP HANA database. The first data set is populated to obtain a first populated data set. Multiple business data in the first populated data set are accumulated to obtain a first accumulated data set. The first accumulated data set and the second data set are merged to obtain a target data set. A target report corresponding to the target data set is generated through a second computational view. In the above process, the first and second data sets can be processed and the target report generated through the computational view of the SAP HANA database, instead of being calculated in real time at the application level of the SAP HANA database using an enhanced variable program, thus reducing resource overhead and improving data processing efficiency. Attached Figure Description
[0069] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0070] Figure 1 A schematic diagram illustrating the application scenarios provided in the embodiments of this application;
[0071] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0072] Figure 3 This is a schematic diagram illustrating the process of obtaining a data processing request provided in an embodiment of this application;
[0073] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0074] Figure 5 A schematic diagram illustrating the data query process provided in this application embodiment;
[0075] Figure 6 This is a schematic diagram illustrating the data processing process provided in the embodiments of this application;
[0076] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0077] Figure 8 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application;
[0078] Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0079] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0081] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0082] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0083] It should be noted that the data processing method and apparatus of this application can be used in the field of big data, or in any field other than big data. The application field of the data processing method and apparatus of this application is not limited.
[0084] To facilitate understanding, the following will be combined with... Figure 1 The application scenarios applicable to the embodiments of this application will be described.
[0085] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1This includes terminal device 101. Terminal device 101 can be a computer, and it includes an SAP HANA database. Users can process multiple business data (business data 1, business data 2, ..., business data N) through the SAP HANA database on terminal device 101 to obtain business reports. Business reports can include multiple business data from the current time period and historical time periods. After terminal device 101 generates business reports, users can query or retrieve them from terminal device 101.
[0086] In related technologies, data processing to generate business reports can be achieved by: establishing a model in S / 4HANA or BW / 4HANA; in BW / 4HANA, using SAP's pre-defined ABAP enhanced variable function, with the user-defined time period corresponding to the business report as the input parameter, generating enhanced input variables corresponding to the input parameter; in the application-level ABAP enhanced variable program, the preset time period is input, and multiple business data corresponding to the preset time period are summarized and calculated; simultaneously, a BW Query is developed on the Cube, and the enhanced input variable is dragged into it. This enables the generation of Web Intelligence format business reports in the SAP BO reporting system. When users obtain or query business reports, the corresponding time period business report can be automatically generated through BW Query and the enhanced variable program based on multiple business data in the Cube, using the user-selected time period. However, in this process, because multiple business data within the current and historical time periods need to be calculated in real-time at the application level of the SAP HANA database using the enhanced variable program, there is significant resource overhead and a long processing time, resulting in low data processing efficiency.
[0087] In this embodiment, after receiving a data processing request, the terminal device determines multiple fields and a statistical period. Based on the data processing request, it retrieves a first data set and a second data set corresponding to the statistical period from the SAP HANA database. Through a first computational view, the first and second data sets are processed to obtain a target data set. The target data set includes the summarized business data corresponding to the statistical period. Then, through a second computational view, a target report corresponding to the target data set is generated. In the above process, the first and second data sets can be processed and the target report generated through the computational view of the SAP HANA database, instead of being calculated in real-time at the SAP HANA database application level using an enhanced variable program, thus reducing resource overhead and improving data processing efficiency.
[0088] The method described in this application will now be illustrated through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.
[0089] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Please refer to [link / reference]. Figure 2 The method may include:
[0090] S201, Obtain data processing request.
[0091] The execution entity in this application embodiment can be a terminal device or a data processing device installed in the terminal device. The data processing device can be implemented by software or by a combination of software and hardware. The terminal device can be a computer.
[0092] The data processing request includes multiple fields and a statistical period, which includes multiple sub-periods, and the current sub-period is included in the multiple sub-periods.
[0093] Users can set multiple fields and statistical time periods on the page provided by the terminal device. The terminal device generates a data processing request based on the user-defined fields and statistical time periods. Users can also set the data processing time period, and the terminal device can perform data processing in real time or periodically (e.g., daily, monthly).
[0094] Below, in conjunction with Figure 3 This section explains the process of obtaining and processing data requests. Figure 3 This is a schematic diagram illustrating the process of obtaining a data processing request provided in an embodiment of this application. Please refer to... Figure 3 This includes interfaces 301 and 302. Interfaces 301 and 302 can be processing pages provided by the terminal device. Referring to interface 301, the user opens the processing page in the application provided by the terminal device. The processing page includes multiple fields and drop-down menus corresponding to multiple dates, as well as text input boxes. Referring to interface 302, in the processing page provided by the terminal device, the user selects service 1 through the drop-down menu corresponding to field 1, and service 2 through the drop-down menu corresponding to field 2. The user selects date 2023 / 01 through the drop-down menu corresponding to date 1, and date 2023 / 03 through the drop-down menu corresponding to date 2. The user then enters the processing conditions in the input box and clicks "OK". The terminal device responds to the user's input selection operation by generating a data processing request, the specific details of which are shown in Table 1.
[0095] Table 1
[0096]
[0097]
[0098] S202. Based on the data processing request, retrieve the first data set and the second data set from the SAP HANA database.
[0099] The first data set includes business data for each field within at least one sub-period, and the second data set includes business data for each field within a historical reference period.
[0100] The historical reference period can be the historical sub-period corresponding to the current sub-period, as well as the historical cumulative period corresponding to multiple sub-periods.
[0101] For example, based on Table 1 above, the current sub-period can be determined to be April 2023. Therefore, the historical sub-period corresponding to April 2023 can be determined to be April 2022. Based on the multiple sub-periods corresponding to January, February, March, and April 2023 in Table 1 above, the historical cumulative period corresponding to these multiple sub-periods can be determined to be January to April 2022. Therefore, the historical reference period can include April 2022 and January to April 2022.
[0102] Based on the multiple sub-time periods shown in Table 1 above, the specific first data set can be determined as shown in Table 2:
[0103] Table 2
[0104]
[0105] Based on the historical reference period determined by the examples above, the specific details of the second dataset can be shown in Table 3:
[0106] Table 3
[0107] Historical reference period Revenue from Business 1 Revenue from Business 2 2022 / 04 6,500 yuan 10,000 yuan 2022 / 01~04 25,000 yuan 30,000 yuan
[0108] S203. The first data set and the second data set are processed through the first calculation view to obtain the target data set.
[0109] The target dataset includes business data for each field across multiple target time periods, which include the current sub-period, statistical period, and historical reference period.
[0110] The first data set and the second data set can be processed through the first calculation view in the following ways to obtain the target data set: the first data set is populated to obtain the first populated data set; multiple business data in the first populated data set are accumulated to obtain the first accumulated data set; the first accumulated data set and the second data set are merged to obtain the target data set.
[0111] For example, based on the first data set shown in Table 2 and the second data set shown in Table 3, the current sub-period is determined to be April 2023, the statistical period is January to April 2023, and the historical reference period is April 2022 and January to April 2022. Based on the target period, the first data set shown in Table 2, and the second data set shown in Table 3, the target data set can be specifically determined as shown in Table 4.
[0112] Table 4
[0113] Statistical period Revenue from Business 1 Revenue from Business 2 2023 / 04 7,000 yuan 0.04 million yuan 2023 / 01~04 28,900 yuan 33,400 yuan 2022 / 04 6,500 yuan 10,000 yuan 2022 / 01~04 25,000 yuan 30,000 yuan
[0114] S204. Generate the target report corresponding to the target data set through the second calculation view.
[0115] The target report corresponding to the target data set can be generated through the second calculation view in the following way: perform a database connection operation on the target data set through the second calculation diagram to obtain the target connection set; generate the target report corresponding to the target data set according to the target connection set in a preset format.
[0116] For example, based on the target data set shown in Table 4 above, insert the target data set into the entity table. Then, in the SAP Bill of Material (BOM) system, create a target report in Web Intelligence format so that users can select the corresponding statistical period for data querying through the query page provided on their terminal devices.
[0117] The data processing method provided in this application embodiment obtains a data processing request. Based on the data processing request, a first data set and a second data set are obtained from the SAP HANA database. The first and second data sets are processed through a first computational view to obtain a target data set. A target report corresponding to the target data set is generated through a second computational view. In the above process, the first and second data sets can be processed and the target report generated through the computational view of the SAP HANA database, instead of being calculated in real-time through an enhanced variable program at the application level of the SAP HANA database, thus reducing resource overhead and improving data processing efficiency.
[0118] Based on any of the above embodiments, the following, in conjunction with Figure 4 The detailed process of data processing is explained.
[0119] Figure 4 This is a flowchart illustrating another data processing method provided in an embodiment of this application. Please refer to... Figure 4 The method includes:
[0120] S401, Obtain data processing request.
[0121] It should be noted that the execution process of S401 can be found in S201, and will not be repeated here.
[0122] S402. Based on the data processing request, retrieve the first data set and the second data set from the SAP HANA database.
[0123] For example, for insurance company A, the first dataset retrieved from the SAP HANA database based on the data processing request can be shown in Table 5:
[0124] Table 5
[0125]
[0126]
[0127] The second dataset obtained from the SAP HANA database is shown in Table 6.
[0128] Table 6
[0129] Historical reference period Income of Insurance 1 Income from Insurance 2 Income from Insurance 3 2022 / 04 0.25 million yuan 10,000 yuan 15,000 yuan 2022 / 01~04 7,000 yuan 30,000 yuan 42,000 yuan
[0130] S403. Fill the first data set to obtain the first filled data set.
[0131] The first data set can be filled in the following way to obtain the first filled data set: For any field, determine the blank sub-time period corresponding to the field in multiple sub-time periods. The first data set does not include the business data of the field in the blank sub-time period. Fill the first data set according to the blank sub-time period corresponding to each field to obtain the first filled data set.
[0132] For example, based on the first data set shown in Table 5 above, for Insurance 1, the sub-periods 2023 / 02 and 2023 / 04 in the first data set do not include the business data corresponding to Insurance 1. Therefore, the blank sub-periods can be determined to be 2023 / 02 and 2023 / 04.
[0133] The first data set can be filled based on the blank sub-period corresponding to each field in the following way to obtain the first filled data set: For any field, the business data of the field in the blank sub-period is determined as a preset value to obtain the filled data corresponding to the field. The filled data includes the field, the blank sub-period, and the preset value; the filled data corresponding to each field is added to the first data set to obtain the first filled data set.
[0134] The default value can be 0.
[0135] For example, based on the example above, for Insurance 1, the blank sub-periods can be determined to be February 2023 and April 2023. The business data for the field during the blank sub-periods will then be set to the preset value 0, resulting in the corresponding fill data for the field. The specific fill data is shown in Table 7:
[0136] Table 7
[0137]
[0138] Add the fill data corresponding to the income of Insurance 1 shown in Table 7 to the first data set shown in Table 5 above to obtain the fill data set for the corresponding fields. Perform the above fill processing on each field in the first data set to obtain the first fill data set.
[0139] S404. Accumulate multiple business data in the first filling data set to obtain the first accumulated data set.
[0140] The first accumulated data set can be obtained by accumulating multiple business data in the first populated data set in the following way: For any field in the first populated data set, the business data of the field in each sub-period is accumulated to obtain multiple first accumulated data corresponding to the field; and the first accumulated data set is generated based on the multiple first accumulated data corresponding to each field.
[0141] The first accumulated data set can be generated based on multiple first accumulated data corresponding to each field in the following way: For any field, accumulate multiple first accumulated data to obtain second accumulated data; generate the first accumulated data set based on the second accumulated data corresponding to each field and the first accumulated data corresponding to the current sub-period.
[0142] For example, based on the first data set shown in Table 5 above, it can be determined that the business data corresponding to the income of Insurance 2 does not need to be populated. Therefore, for the income field of Insurance 2 in the first data set, the business data of the field in each sub-period is accumulated to obtain the first accumulated data corresponding to each sub-period. The specific first accumulated data corresponding to each sub-period can be shown in Table 8:
[0143] Table 8
[0144] Sub-period First accumulated data 2023 / 01 Insurance 2 income was 0.5 million yuan. 2023 / 02 Insurance 2's income was 0.6 million yuan. 2023 / 03 Insurance 2's income was 13,000 yuan. 2023 / 04 Insurance 2's income was 12,000 yuan.
[0145] The multiple first accumulated data shown in Table 8 are summed to obtain a second accumulated data of 36,000 yuan. Therefore, the second accumulated data corresponding to Insurance 2's income is determined to be 36,000 yuan, and the first accumulated data corresponding to the current sub-period is 12,000 yuan. The specific first accumulated data set generated by determining the second accumulated data for each field and the first accumulated data for the current sub-period using the above method is shown in Table 9.
[0146] Table 9
[0147]
[0148]
[0149] The first accumulated data set can be stored in the SAP HANA database as the second data set for the next statistical period.
[0150] For example, suppose the statistical period is January 2024, February 2024, March 2024, and April 2024. Then the first cumulative data set shown in Table 9 can be used as the second data set for this statistical period.
[0151] S405. Merge the first accumulated data set and the second data set to obtain the target data set.
[0152] For example, by merging the second data set shown in Table 6 and the first accumulated data set shown in Table 9, the target data set can be specifically obtained as shown in Table 10:
[0153] Table 10
[0154] Statistical period Income of Insurance 1 Insurance 2 income Income from Insurance 3 2023 / 04 0 million yuan 12,000 yuan 12,000 yuan 2023 / 01~04 6,500 yuan 36,000 yuan 45,000 yuan 2022 / 04 0.25 million yuan 10,000 yuan 15,000 yuan 2022 / 01~04 7,000 yuan 30,000 yuan 42,000 yuan
[0155] S406. Generate the target report corresponding to the target data set through the second calculation view.
[0156] In SAP HANA-based S / 4HANA business systems or BW / 4HANA data warehouse systems, the target data set is inserted into entity tables and stored. Within SAP HANA-based S / 4HANA business systems or BW / 4HANA data warehouse systems, the target reports can be queried using BW Query.
[0157] After generating the target report, data can be queried through the page provided by the terminal device. Data querying can be performed as follows: obtain a data query request, which includes the target field and target time period; in the target report, identify at least one target data corresponding to the data query request; generate and display the query results based on at least one target data.
[0158] Below, in conjunction with Figure 5 The process of data query is explained. Figure 5 This is a schematic diagram illustrating the data query process provided in an embodiment of this application. Please refer to [link / reference]. Figure 5 This includes interfaces 501 and 502. Interfaces 501 and 502 can be query pages provided by the terminal device. Referring to interface 501, the user can select the business type, business name, and statistical period on the query page of interface 501 and click "OK." The terminal device responds to the user's input selection and generates a data query request. The terminal device determines at least one target data corresponding to the data query request in the target report of the database and generates query results based on at least one target data. Referring to interface 502, the terminal device displays the query results. The user can further filter the statistical period on the query page of the terminal device based on the query results. The terminal device updates the displayed query results in response to the user's selection.
[0159] The data processing method provided in this application embodiment obtains a data processing request. Based on the data processing request, a first data set and a second data set are obtained from the SAP HANA database. The first data set is populated to obtain a first populated data set. Multiple business data in the first populated data set are accumulated to obtain a first accumulated data set. The first accumulated data set and the second data set are merged to obtain a target data set. A target report corresponding to the target data set is generated through a second computational view. In the above process, the first and second data sets can be processed and the target report generated through the computational view of the SAP HANA database, instead of being calculated in real time at the SAP HANA database application level through an enhanced variable program, reducing resource overhead and improving data processing efficiency.
[0160] Based on any of the above embodiments, the following, in conjunction with Figure 6 The process of data processing will be illustrated with examples.
[0161] Figure 6 This is a schematic diagram illustrating the data processing procedure provided in an embodiment of this application. Please refer to... Figure 6 This includes terminal device 601. Terminal device 601 can be a computer, and it contains an SAP HANA database.
[0162] Users can set multiple fields and statistical time periods on the page provided by terminal device 601. Terminal device 601 generates a data processing request based on the user-defined fields and statistical time periods. The specific data processing request is shown in Table 11.
[0163] Table 11
[0164] Field 1 Profit of Insurance 1 Field 2 Insurance 2's profit Sub-period 1 2023 / 01 Sub-period 2 2023 / 02 Sub-period 3 2023 / 03 Current sub-period 2023 / 04
[0165] Terminal device 601, as shown in Table 11, retrieves a first data set and a second data set from the SAP HANA database based on the data processing request. The first data set is specifically shown in Table 12.
[0166] Table 12
[0167]
[0168] The second dataset can be specifically shown in Table 13:
[0169] Table 13
[0170] Historical reference period Profit of Insurance 1 Insurance 2's profit 2022 / 04 0.5 million yuan 0.5 million yuan 2022 / 01~04 15,000 yuan 25,000 yuan
[0171] Terminal device 601 populates the first data set shown in Table 13 using the first computed view of the SAP HANA database to obtain a first populated data set. The first populated data set can be specifically shown in Table 14.
[0172] Table 14
[0173]
[0174]
[0175] Terminal device 601 uses the first computed view of the SAP HANA database to accumulate multiple business data in the first populated data set shown in Table 14, obtaining a first accumulated data set. The first accumulated data set can be specifically shown in Table 15.
[0176] Table 15
[0177] Sub-period Profit of Insurance 1 Insurance 2's profit 2023 / 04 0 million yuan 11,000 yuan 2023 / 01~04 11,000 yuan 35,000 yuan
[0178] Terminal device 601 merges the first accumulated data set shown in Table 15 and the corresponding second data set in Table 13 through the first computed view of the SAP HANA database to obtain the target data set. The target data set is shown in Table 16.
[0179] Table 16
[0180] Sub-period Profit of Insurance 1 Insurance 2's profit 2023 / 04 0 million yuan 11,000 yuan 2023 / 01~04 11,000 yuan 35,000 yuan 2022 / 04 0.5 million yuan 0.5 million yuan 2022 / 01~04 15,000 yuan 25,000 yuan
[0181] Terminal device 601 generates the target report corresponding to the target data set shown in Table 16 through the second computed view of the SAP HANA database. It then creates the target report in Web Intelligence format within the SAP BO reporting system, allowing users to select the corresponding statistical period for data querying via the query page provided by the terminal device.
[0182] The data processing procedure provided in this application embodiment involves obtaining a data processing request. Based on the request, a first data set and a second data set are retrieved from the SAP HANA database. The first data set is populated to obtain a first populated data set. Multiple business data sets in the first populated data set are accumulated to obtain a first accumulated data set. The first accumulated data set and the second data set are merged to obtain a target data set. A target report corresponding to the target data set is generated through a second computational view. In the above process, the first and second data sets can be processed and the target report generated through the computational view of the SAP HANA database, instead of being calculated in real-time at the SAP HANA database application level using an enhanced variable program. This reduces resource overhead and improves data processing efficiency.
[0183] Figure 7 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application. Please refer to... Figure 7 The data processing device 10 may include:
[0184] The first acquisition module 11 is used to acquire a data processing request, the data processing request including multiple fields and a statistical time period, the statistical time period including multiple sub-time periods, and the multiple sub-time periods including the current sub-time period;
[0185] The second acquisition module 12 is used to acquire a first data set and a second data set from the SAP HANA database, an in-memory computing platform that supports enterprise pre-deployment and cloud deployment modes, according to the data processing request. The first data set includes business data for each field in at least one sub-period, and the second data set includes business data for each field in a historical reference period.
[0186] Processing module 13 is used to process the first data set and the second data set through a first calculation view to obtain a target data set. The target data set includes business data for each field in multiple target time periods. The multiple target time periods include the current sub-time period, the statistical time period, and the historical reference time period.
[0187] The generation module 14 is used to generate a target report corresponding to the target data set through the second calculation view.
[0188] In one possible implementation, the processing module 13 is specifically used for:
[0189] The first data set is filled to obtain a first filled data set;
[0190] The multiple business data in the first filling data set are accumulated to obtain the first accumulated data set;
[0191] The first accumulated data set and the second data set are merged to obtain the target data set.
[0192] In one possible implementation, the processing module 13 is specifically used for:
[0193] For any given field, determine the blank sub-period corresponding to the field among the plurality of sub-periods, wherein the first data set does not include the business data of the field within the blank sub-period;
[0194] The first data set is filled based on the blank sub-period corresponding to each field to obtain the first filled data set.
[0195] In one possible implementation, the processing module 13 is specifically used for:
[0196] For any given field, the business data of that field in the blank sub-period is determined as a preset value, and the corresponding fill data for that field is obtained. The fill data includes the field, the blank sub-period, and the preset value.
[0197] Add the corresponding fill data for each field to the first data set to obtain the first fill data set.
[0198] In one possible implementation, the processing module 13 is specifically used for:
[0199] For any field in the first data set to be filled, the business data of the field in each sub-period are accumulated to obtain multiple first accumulated data corresponding to the field;
[0200] Generate the first accumulated data set based on the multiple first accumulated data corresponding to each field.
[0201] In one possible implementation, the processing module 13 is specifically used for:
[0202] For any given field, the multiple first accumulated data are summed to obtain the second accumulated data;
[0203] The first accumulated data set is generated based on the second accumulated data corresponding to each field and the first accumulated data corresponding to the current sub-period.
[0204] In one possible implementation, the generation module 14 is specifically used for:
[0205] The target data set is obtained by performing a database connection operation on the target data set using the second computational graph;
[0206] The target connection set is used to generate a target report corresponding to the target data set according to a preset format.
[0207] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0208] Figure 8 This is a schematic diagram of another data processing apparatus provided in an embodiment of this application. Figure 7 Based on the illustrated embodiments, please refer to Figure 8 The data processing device 10 also includes a query module 15.
[0209] The query module 15 is used for:
[0210] Obtain a data query request, which includes a target field and a target time period;
[0211] In the target report, at least one target data corresponding to the data query request is identified;
[0212] Based on the at least one target data, generate query results and display the query results.
[0213] The data processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0214] Figure 9 This is a schematic diagram of the structure of the terminal device provided in an embodiment of this application. Please refer to... Figure 9 The terminal device 20 may include a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.
[0215] Memory 21 is used to store program instructions;
[0216] The processor 22 is used to execute the program instructions stored in the memory, so that the terminal device 20 performs the method shown in the above method embodiment.
[0217] The terminal device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0218] This application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-described method when executed by a processor.
[0219] This application embodiment may also provide a computer program product, including a computer program that, when executed by a processor, can implement the above-described method.
[0220] All or part of the steps in the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above-described method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0221] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0222] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0223] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0224] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. A data processing method, characterized in that, include: Obtain a data processing request, the data processing request including multiple fields and a statistical time period, the statistical time period including multiple sub-time periods, the multiple sub-time periods including the current sub-time period; According to the data processing request, a first data set and a second data set are obtained from the SAPHANA database, an in-memory computing platform that supports enterprise pre-deployment and cloud deployment modes. The first data set includes business data for each field within at least one sub-period, and the second data set includes business data for each field within a historical reference period. The first data set is populated using a first calculation view to obtain a first populated data set; multiple business data in the first populated data set are accumulated to obtain a first accumulated data set; the first accumulated data set and the second data set are merged to obtain a target data set, wherein the target data set includes business data for each field in multiple target time periods, and the multiple target time periods include the current sub-time period, the statistical time period, and the historical reference time period; The target data set is connected to the database using the second calculation formula to obtain the target connection set; the target connection set is then used to generate the target report corresponding to the target data set according to a preset format.
2. The method according to claim 1, characterized in that, The first data set is padded to obtain a first padded data set, including: For any given field, determine the blank sub-period corresponding to the field among the plurality of sub-periods, wherein the first data set does not include the business data of the field within the blank sub-period; The first data set is filled based on the blank sub-period corresponding to each field to obtain the first filled data set.
3. The method according to claim 2, characterized in that, Based on the blank sub-period corresponding to each field, the first data set is filled to obtain the first filled data set, including: For any given field, the business data of that field in the blank sub-period is determined as a preset value, and the corresponding fill data for that field is obtained. The fill data includes the field, the blank sub-period, and the preset value. Add the corresponding fill data for each field to the first data set to obtain the first fill data set.
4. The method according to claim 1, characterized in that, Multiple business data in the first filling data set are accumulated to obtain a first accumulated data set, including: For any field in the first data set to be filled, the business data of the field in each sub-period are accumulated to obtain multiple first accumulated data corresponding to the field; Generate the first accumulated data set based on the multiple first accumulated data corresponding to each field.
5. The method according to claim 4, characterized in that, Based on the first accumulated data corresponding to each field, generate the first accumulated data set, including: For any given field, the multiple first accumulated data are summed to obtain the second accumulated data; The first accumulated data set is generated based on the second accumulated data corresponding to each field and the first accumulated data corresponding to the current sub-period.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Obtain a data query request, which includes a target field and a target time period; In the target report, at least one target data corresponding to the data query request is identified; Based on the at least one target data, generate query results and display the query results.
7. A data processing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire a data processing request, the data processing request including multiple fields and a statistical time period, the statistical time period including multiple sub-time periods, and the multiple sub-time periods including the current sub-time period; The second acquisition module is used to acquire a first data set and a second data set from the SAP HANA database, an in-memory computing platform that supports enterprise pre-deployment and cloud deployment modes, according to the data processing request. The first data set includes business data for each field in at least one sub-period, and the second data set includes business data for each field in a historical reference period. The processing module is configured to populate the first data set through a first calculation view to obtain a first populated data set; accumulate multiple business data in the first populated data set to obtain a first accumulated data set; and merge the first accumulated data set and the second data set to obtain a target data set. The target data set includes business data for each field in multiple target time periods, and the multiple target time periods include the current sub-time period, the statistical time period, and the historical reference time period. The generation module is used to perform database connection operations on the target data set through the second calculation formula graph to obtain a target connection set; and to generate a target report corresponding to the target data set according to a preset format.
8. A terminal device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.