Data processing method and device, equipment and medium
By generating a unified target data table, the problem of low data processing efficiency in big data scenarios is solved, information integration and resource saving are achieved, and data processing efficiency is improved.
Patent Information
- Application Number
- CN202410851432.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-01
AI Technical Summary
In big data scenarios, data processing efficiency is low. Existing technologies usually require the establishment of multiple data tables to process the lowest level data, resulting in a large number of tables and low processing efficiency.
By obtaining multiple levels of original data items and their corresponding processing items, target records are generated, including target data items, target processing items, and target processing values, to form a unified target data table that represents the data items, processing items, and processing values. Correspondence, reduce the number of data tables, and improve data processing efficiency.
Integrate a variety of information into a unified target data table, save storage and computing resources, reduce the number of interactions with other systems, reduce transmission resource overhead, and significantly improve data processing efficiency.
Smart Images

Figure CN118733591A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically cloud computing, big data and other technical fields, and can be applied to smart cloud scenarios, and in particular to a data processing method, device, equipment and medium. Background Art
[0002] In the big data scenario, the relationship between data is more complex, and the way to process data may also be more complex. Therefore, it is necessary to solve the problem of how to improve data processing efficiency. Summary of the invention
[0003] The present disclosure provides a data processing method, apparatus, device and medium.
[0004] According to one aspect of the present disclosure, a data processing method is provided, comprising: acquiring original data items of multiple levels, and original processing items corresponding to leaf data items in the original data items; generating a target record based on the original data items and the original processing items; the field values of the target record comprising: a target data item, a target processing item and a target processing value, the target data item being obtained based on the original data item, the target processing item being obtained based on the original processing item, and the target processing value being obtained based on the leaf data item and the original processing item; generating a target data table based on the target record; the target data table being used to characterize the correspondence between the target data item, the target processing item and the target processing value.
[0005] According to another aspect of the present disclosure, a data processing device is provided, including: an acquisition module for acquiring original data items of multiple levels, and original processing items corresponding to leaf data items in the original data items; a first generation module for generating a target record based on the original data items and the original processing items; the field values of the target record include: a target data item, a target processing item and a target processing value, the target data item is obtained based on the original data item, the target processing item is obtained based on the original processing item, and the target processing value is obtained based on the leaf data item and the original processing item; a second generation module is used to generate a target data table based on the target record; the target data table is used to characterize the correspondence between the target data item, the target processing item and the target processing value.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method as described in any of the above aspects.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to any one of the above aspects.
[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the methods described in any one of the above aspects.
[0009] According to the embodiments of the present disclosure, data processing efficiency can be improved.
[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0013] Figure 2 is a schematic diagram of multiple levels of original data items provided according to an embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram of a target data table provided according to an embodiment of the present disclosure;
[0015] Figure 4 is a schematic diagram of an application scenario for implementing the data processing method provided by an embodiment of the present disclosure;
[0016] Figure 5 is a schematic diagram according to a second embodiment of the present disclosure;
[0017] Figure 6 is a schematic diagram of a target processing value writing process provided according to an embodiment of the present disclosure;
[0018] Figure 7 is a schematic diagram of a visualization matrix provided according to an embodiment of the present disclosure;
[0019] Figure 8 is a schematic diagram according to a third embodiment of the present disclosure;
[0020] Fig. 9 It is a schematic diagram of an electronic device used to implement the data processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] In the big data scenario, the relationship between data is more complex. For example, data can be divided into multiple levels, such as revenue includes hardware revenue and software revenue, etc. Furthermore, the data processing method may also be more complex. For example, there are multiple processing methods for the same data. For example, for the data of revenue, the processing method may include quarterly processing to obtain quarterly revenue, annual processing to obtain annual revenue, etc.
[0023] In the related art, a data table is usually established for the lowest level data and processing method, and data processing is performed based on these data tables, which results in a large number of data tables and low data processing efficiency.
[0024] In order to improve data processing efficiency, the present disclosure provides the following embodiments.
[0025] In order to better understand the present disclosure, the terms involved in the present disclosure are explained as follows:
[0026] Table: a data table. Table is one of the core concepts in a database. It defines the organization of data, including which rows or records the table contains.
[0027] Record: A row in a data table. A data table contains one or more records (rows). In a big data scenario, a data table may have many rows, such as tens of millions.
[0028] Field: A column in a data table. A data table includes one or more fields (columns).
[0029] Field value: The value corresponding to the field. For example, for the same column, it can correspond to multiple rows, and the value of each row corresponding to the column is the field value. For example, for the "Data Item" field, the field value can include "Income", "Hardware Income", "Software Income" and other field values.
[0030] Data item: is the data to be processed, such as income, hardware income, software income, etc., which belong to different data items.
[0031] Processing item: It is a data processing method. For example, quarterly processing (which may be called quarterly processing item) and annual processing (which may be called annual processing item) are different processing items.
[0032] Processing value: The value of the processing item corresponding to the data item. For example, if the data item is hardware revenue and the processing item is based on annual processing, the corresponding processing value is the specific hardware annual revenue value.
[0033] Leaf data item: refers to the data item at the lowest level among multiple levels. Assuming there are N (N is a positive integer) levels, from top to bottom (i.e., from high to low), they can be called the first level to the Nth level respectively. For example, revenue includes hardware revenue and software revenue, then revenue is the first level, hardware revenue and software revenue are the second level. Assuming there are only these two levels, then hardware revenue and software revenue are leaf data items.
[0034] Leaf processing items: If the processing items also have multiple levels, then the processing items at the lowest level are leaf processing items. For example, the processing items at the first level are annual processing items; the processing items at the second level include first quarter processing items, second quarter processing items, third quarter processing items, and fourth quarter processing items. In the case of these two levels of processing items, first quarter processing items to fourth quarter processing items are leaf processing items. Alternatively, if the processing items have only one level, then the processing items at that level can be used as leaf processing items.
[0035] Leaf processing value: the processing value corresponding to the leaf processing item of the leaf data item. For example, the specific revenue value of hardware revenue in the first quarter, the specific revenue value of hardware revenue in the second quarter, etc.
[0036] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. This embodiment provides a data processing method, such as Figure 1 As shown, the method includes:
[0037] 101. Acquire original data items of multiple levels and original processing items corresponding to leaf data items in the original data items.
[0038] 102. Generate a target record based on the original data item and the original processed item; the field values of the target record include: a target data item, a target processed item and a target processed value, the target data item is obtained based on the original data item, the target processed item is obtained based on the original processed item, and the target processed value is obtained based on the leaf data item and the original processed item.
[0039] 103. Generate a target data table based on the target record; the target data table is used to represent the correspondence between the target data items, the target processing items, and the target processing values.
[0040] In this embodiment, a target data table is generated based on the target record. The target record includes target data items, target processing items and target processing values. The target data items are obtained based on the original data items, the target processing items are obtained based on the original processing items, and the target processing values are obtained based on the leaf data items and the original processing items. In this way, multiple information can be integrated into a unified target data table. Compared with the method of generating a data table for each type of information, the number of data tables can be reduced, thereby improving data processing efficiency.
[0041] During implementation, the data processing method can be specifically executed by a physical device, which can be a terminal device, a server, a processing unit, etc. Since various information is unified into a target data table, the unified target data table can be calculated and stored inside the physical device, which saves storage resources and computing resources of the physical device, improves processing speed, and enhances the internal performance of the physical device. In addition, the physical device can obtain original data items from data sources of other systems, and feed back the finally generated target data table to other systems. Since the unified target data table is obtained by unified processing of the original data items, the number of interactions with other systems can be reduced, thereby reducing transmission resource overhead and improving processing efficiency.
[0042] The original data items are the acquired original data. In a big data scenario, the relationship between the original data is relatively complex. Specifically, the original data items may be multi-level.
[0043] Figure 2 is a schematic diagram of multiple levels of original data items provided according to an embodiment of the present disclosure. Figure 2 As shown, A, B, C, A1~A2, etc. are all original data items. Assume that these original data are divided into three levels, represented by the first to third levels from high to low (or from top to bottom), and the upper level includes the lower level. Taking the original data item A as an example, A belongs to the first level, A1~A2 belong to the second level, then A includes A1~A2. Specifically, A is income, A1 is hardware income, and A2 is software income. The same level includes one or more types of original data items. For example, A and B both belong to the first level, and A and B are of different types, such as A is income and B is cost.
[0044] The lowest level primitive data items of each type of data are called leaf data items. Figure 2 In the example shown, A1, A2, B21, B22, and C are leaf data items.
[0045] The original processing item is the processing item corresponding to the leaf data item. The correspondence between the leaf data item and the processing item can be pre-configured, and the original data item is obtained based on the pre-configured correspondence.
[0046] For example, for leaf data item A1, assuming that the pre-configured processing items corresponding to A1 include O-1 and O-2, then the original processing items corresponding to A1 include O-1 and O-2.
[0047] Each leaf data item may correspond to one or more original processing items, and different leaf data items may correspond to the same or different original processing items.
[0048] Furthermore, the original processing items may be of one or more levels. For example, the processing items corresponding to data item A1 include O-1, O-2 and O-3, O-3 belongs to the first level, O-1 and O-2 belong to the second level. Specifically, O-3 is an annual processing item, O-1 and O-2 are quarterly processing items, etc.
[0049] Target record: A data table is composed of records, each record is a row of the data table; the target record is the record in the target data table that is finally generated.
[0050] Each record consists of one or more field values.
[0051] The target record includes the following field values: target data item, target processing item and target processing value.
[0052] Figure 3 It is a schematic diagram of a target data table provided according to an embodiment of the present disclosure.
[0053] like Figure 3 As shown, the target data table includes the following fields: data field, processing field, processing value field, the target data table includes at least one target record, each target record includes field values corresponding to each field, namely: target data item, target processing item and target processing value. Specifically, the target data items include B21, B22, B, etc., the target processing items include O-1, O-2, and the target processing values include a, b, c, etc.
[0054] After generating at least one target record, these target records are organized into a target data table.
[0055] Among them, each record corresponds to a row of the data table, and each field corresponds to a column of the data table.
[0056] The target data items include: original data items at each level. For example, based on Figure 2 In the example of , the target data items include: A, A1, A2, B, B1, B2, B21, B22 and C.
[0057] The target processing items include: the original processing items corresponding to the leaf data items. The original processing items are obtained based on the preset correspondence between the data items and the processing items. For example, B21 is a leaf data item. Assuming that the original processing items corresponding to the leaf data item are pre-configured to include O-1 and O-2, then Figure 3 As shown in FIG. 1 , the target processing items corresponding to the leaf data item B21 include O-1 and O-2. For another example, assuming that B22 is pre-configured to correspond to O-1, then Figure 3 As shown, the target processing item corresponding to the leaf data item B22 is O-1.
[0058] The same original data item can occupy one or more rows, and the number of rows it occupies is the same as the number of items in its corresponding target processing items. For example, for B21, its target processing items include O-1 and O-2, so B21 occupies two rows.
[0059] The target processing value includes: the leaf processing value, which is the value obtained by processing the leaf data item based on the original processing item. For example, the specific hardware revenue value for the first quarter obtained based on the calculation method for the first quarter. Figure 3 , assuming that the leaf processing values include a, b, and c. The target processing values of different rows can be the same or different.
[0060] In this way, a target data table is obtained, which can reflect the target processing values of each target data item under the corresponding target processing items, so that users can understand the relevant situations of the data items. For example, the data item can be a profit and loss (PL) item, and the processing item is a different analysis dimension. In this way, the values of the PL item under different analysis dimensions can be obtained, such as hardware quarterly revenue, hardware annual revenue, software quarterly revenue, software annual revenue, etc.
[0061] Figure 4 Schematic diagram of an application scenario for implementing the data processing method provided by the embodiment of the present disclosure. Figure 4 As shown, the data warehouse 401 can obtain original data (i.e., original data items of multiple levels) from a data source 402 (such as a business system), such as by using an Extract-Transform-Load (ETL) tool to load the original data items of multiple levels into the data warehouse, specifically, into the Operational Data Store (ODS) layer of the data warehouse, and then, a data processing tool (referred to as a data processing system) can be used to generate target records based on the original data items and the original processing items corresponding to the pre-configured leaf data items, and generate a target data table based on the target records. The target data table uniformly records the original data items of each level, and uniformly records a variety of target processing items. Compared with the method of generating a table for each level of original data items and each processing item, the number of tables can be reduced and the data processing efficiency can be improved.
[0062] The target data table can be stored in the data warehouse (DW) layer of the data warehouse, and then the data processing system can send the target data table to the front-end application (APP) 403 corresponding to the data warehouse, and display it to the user through the APP. Alternatively, the data processing system can further process the target data table, such as using a visualization tool to process the target data table, generate visualization data, send the visualization data to the APP, and display the visualization data to the user through the APP.
[0063] In combination with the above application scenarios, the present disclosure also provides the following embodiments.
[0064] Figure 5 is a schematic diagram according to a second embodiment of the present disclosure. This embodiment provides a data processing method, the method comprising:
[0065] 501. Acquire original data items of multiple levels and original processing items corresponding to leaf data items in the original data items.
[0066] 502. Generate a target record based on the original data item and the original processed item; the field values of the target record include: a target data item, a target processed item and a target processed value, the target data item is obtained based on the original data item, the target processed item is obtained based on the original processed item, and the target processed value is obtained based on the leaf data item and the original processed item.
[0067] There is at least one target record, and each target record includes the following field values: target data item, target processing item and target processing value.
[0068] Regarding the target data item: the target data item may include: an original data item, and / or a calculated data item, where the calculated data item is obtained after calculating multiple original data items.
[0069] Specifically, if the target data item includes the original data item, each original data item at each level can be used as a target data item. Figure 2 In the example of , the target data items include: A, A1, A2, B, B1, B2, B21, B22, and C. Since there are 9 original data items, at least 9 target records are generated, and each target record corresponds to one original data item.
[0070] Alternatively, the target data item may also include calculated data items. For example, if the original data item includes revenue and cost, the gross profit margin may be calculated based on the revenue and cost, and the calculated gross profit margin may be used as a target data item.
[0071] In this embodiment, by using original data items and / or calculated data items as target data items, more flexible and comprehensive target data items can be obtained as needed, thereby making the target data table contain richer information and improving data processing accuracy.
[0072] For a target processing item: if the target data item is a leaf data item, obtaining the target processing item in the target record where the target data item is located based on the original processing item; or,
[0073] If the target data item is a non-leaf data item, the union of the processing items corresponding to the original data items at the next level below the target data item is used as the target processing item corresponding to the target data item.
[0074] For example, see Figure 2 , B21 and B22 are leaf data items. Assume that the original processing items corresponding to B21 include O-1 and O-2, and the original processing items corresponding to B22 include O-3. And assume that the original processing items are taken as the target processing items corresponding to the leaf data items. Then, see Figure 3 , the target processing items corresponding to B21 include O-1 and O-2, each target processing item occupies one line; the target processing items corresponding to B22 include O-3.
[0075] In this way, the target processing item corresponding to the leaf data item is obtained.
[0076] When the target data item is not a leaf data item, the target data item has the original data item of the next level. For example, the target data item is B2, and the original data items of the next level include B21 and B22. Then, the target processing item corresponding to the target data item B2 is the union of the processing items corresponding to B21 and B22, that is, O-1, O-2 and O-3. Since B2 corresponds to three target processing items, B2 will occupy three rows, each row corresponding to one target processing item.
[0077] In this way, the target processing item corresponding to the non-leaf data item is obtained.
[0078] And so on, each target processing item corresponding to each target data item can be obtained.
[0079] In this embodiment, the target processing item corresponding to the leaf data item is obtained based on the original processing item, and the target processing item corresponding to the non-leaf data item is obtained based on the processing item corresponding to the original data item of the next level. Different methods of obtaining the target processing item can be adopted based on whether the target data item is a leaf data item, thereby improving the accuracy of the target processing item.
[0080] Furthermore, for leaf data items, the original processing items and / or the post-processing items can be used as target processing items corresponding to the leaf data items, similar to the processing of the target data items. The post-processing items are obtained after performing operations on multiple original processing items. For example, the original processing items include the first quarter income and the second quarter income, and the post-processing items may include the quarterly growth rate, which is calculated based on the first quarter income and the second quarter income.
[0081] In this embodiment, by using the original processing items and / or post-processing items as target processing items, more flexible and comprehensive target processing items can be obtained as needed, thereby allowing the target data table to contain richer information and improve data processing accuracy.
[0082] Processing values for the target:
[0083] Leaf data item The lowest level primitive data item in multiple levels.
[0084] Assuming that the original processing item has only one level, the original processing item itself is regarded as a leaf processing item; or, if the original processing item has multiple levels, the original processing item at the lowest level is regarded as a leaf processing item.
[0085] The value obtained by processing the leaf data item using the leaf processing item is called the leaf processing value, such as the hardware revenue value in the first quarter.
[0086] The target treatment value in each target record is obtained based on the leaf treatment value.
[0087] In this embodiment, the target processing value is obtained based on the leaf processing value, so that the target processing value can be obtained accurately and efficiently.
[0088] Specifically, in one case: in response to determining that the target data item is a leaf data item, and the target processing item in the target record where the target data item is located is a leaf processing item, the leaf processing value corresponding to the leaf processing item of the leaf data item is used as the target processing value in the target record where the target data item is located.
[0089] For example, see Figure 3 , assuming that B21 is a leaf data item and O-1 is a leaf processing item, then the target processing value a corresponding to the leaf data item and the leaf processing item is the leaf processing value obtained by calculating B21 using O-1.
[0090] In this embodiment, for leaf data items and leaf processing items, the leaf processing value is used as the target processing value of the corresponding record, so that the target processing value in this case can be accurately obtained.
[0091] In another case: in response to determining that the target data item is a non-leaf data item, the processing value of the target processing item corresponding to the original data item at the next level of the target data item is obtained, and the obtained processing values are summed to obtain the target data item and the target processing value in the target record where the target processing item is located.
[0092] For example, see Figure 3 , B2 is a non-leaf data item, and its next-level original data items include B21 and B22, and its target processing items include O-1 and O-2. For each target processing item, such as O-1, the processing value a of B21 corresponding to O-1 and the processing value c of B22 corresponding to O-1 are summed to obtain the target processing value (a+c) of B2 corresponding to O-1. Similarly, for O-2, the processing value b of B21 at O-2 and the processing value (empty) of B22 at O-2 are summed to obtain the target processing value b of B2 corresponding to O-2.
[0093] In this embodiment, the target processing value corresponding to the non-leaf data item is obtained based on the processing value corresponding to the original data item at the next level, rather than being calculated based on the full amount of data. This can improve the effectiveness of the calculation and improve data processing efficiency.
[0094] In another case: in response to determining that the target processing item is a non-leaf processing item, the processing value of the target data item corresponding to the original processing item at the next level of the target processing item is obtained, and the obtained processing values are summed to obtain the target data item and the target processing value in the target record where the target processing item is located.
[0095] This situation is similar to the previous one. In the previous one, there is a data item at the next level. In this case, there is a processing item at the next level. In this case, the processing value corresponding to the processing item at the next level is calculated. For example, for the same target data item (such as income), if the target processing item is annual income, and the processing items at the next level include four quarterly incomes, then the four specific income values of the four quarterly incomes can be summed to obtain the target processing value (specific annual income value) corresponding to the target processing item (annual income).
[0096] In this embodiment, the target processing value corresponding to the non-leaf processing item is obtained based on the processing value corresponding to the original processing item at the next level, rather than being calculated based on the full amount of data. This can improve the effectiveness of the calculation and improve data processing efficiency.
[0097] In addition, operations such as data selection and summation at the next level can be implemented using Structured Query Language (SQL) statements.
[0098] Specifically, an SQL statement corresponding to the data item may be used to obtain the processing value of the target processing item corresponding to the original data item at the next level of the target data item, and perform a sum operation on the obtained processing values; or,
[0099] The SQL statement corresponding to the processing item is used to obtain the processing value of the target data item corresponding to the original processing item at the next level of the target processing item, and the obtained processing value is summed.
[0100] Taking non-leaf data items as an example, a hierarchical table can be pre-established, which records the original data items arranged in a hierarchical manner to represent the hierarchical relationship of the original data items. Figure 2 For example, the first row of the hierarchy table is: null, A1, A; the second row is: null, A2, A; similarly, another row is: B21, B2, B; and another row is: null, null, C.
[0101] Based on this, the target processing value can be obtained by the following steps:
[0102] First, the leaf processing value is written into the corresponding target record, that is, the target processing value of the target record where the leaf data item and the leaf processing item are located;
[0103] Secondly, starting from the current level being the (N-1)th level, the next level of the current level is determined in sequence based on the level table, and the target processing value of the current level is obtained according to the processing value of the next level, until the target processing value of the first level is obtained. Where N is the number of levels. For each current level, a corresponding SQL statement can be used for implementation.
[0104] Figure 6 It is a schematic diagram of a target processing value writing process provided according to an embodiment of the present disclosure.
[0105] like Figure 6 As shown, taking the three-level original data items as an example, the following process is executed in sequence: First, write the target processing value corresponding to the third level into the target data table, such as Figure 3a~c shown in the target data table; secondly, using the first SQL statement, based on the hierarchy table, determine the third level and its corresponding second level, and filter out the target processing value corresponding to the third level in the target data table, sum the filtered target processing values to obtain the target processing value of the second level, such as obtaining the target processing value of B2, and write the target processing value of B2 into the target data table; thirdly, using the second SQL statement, based on the hierarchy table, determine the second level and its corresponding first level, and filter out the target processing value corresponding to the second level in the target data table, sum the filtered target processing values to obtain the target processing value of the first level, such as obtaining the target processing value of B, and write the target processing value of B into the target data table.
[0106] Each SQL statement is used to complete the above-mentioned operations such as filtering and summing, and may include keywords such as select, join...on, and sum.
[0107] In this way, related operations can be completed quickly through SQL statements, improving data processing efficiency.
[0108] 503. Generate a target data table based on the target record; the target data table is used to represent the correspondence between the target data items, the target processing items, and the target processing values.
[0109] The target data item, the target processing item and the target processing value are respectively used as a field value of the target record to generate a target record, and then at least one target record is used to form a target data table.
[0110] 504. Generate a visualization matrix based on the target data table; the rows of the visualization matrix correspond to the target data items, the columns of the visualization matrix correspond to the target processing items, and the elements of the visualization matrix correspond to the target processing values.
[0111] 505. Display the visualization matrix.
[0112] Figure 7 is a schematic diagram of a visualization matrix provided according to an embodiment of the present disclosure.
[0113] like Figure 7 As shown, assuming that there are N target data items and M target processing items, an N*M (N rows and M columns) matrix can be generated, and the element (Vij) in the i-th row and j-th column of the matrix is the target processing value of the j-th target processing item corresponding to the i-th target data item, such as V12 and V21. Where i = 1, 2..., N, j = 1, 2, .., M, and N and M are both positive integers.
[0114] In addition, since not every target data item corresponds to every target processing item, such as Figure 7As shown, the target processing value of one or more positions in the matrix may be empty, such as the position of the first row and the first column is empty.
[0115] In this embodiment, by generating and displaying a visualization matrix, the target data items, target processing items and their corresponding target processing values can be intuitively displayed, which is convenient for users to view.
[0116] Figure 8 800 is a schematic diagram according to the third embodiment of the present disclosure, and the present embodiment provides a data processing device. The device 800 includes: an acquisition module 801, a first generation module 802 and a second generation module 803.
[0117] The acquisition module 801 is used to acquire original data items of multiple levels, and original processing items corresponding to leaf data items in the original data items; the first generation module 802 is used to generate a target record based on the original data items and the original processing items; the field values of the target record include: target data items, target processing items and target processing values, the target data items are obtained based on the original data items, the target processing items are obtained based on the original processing items, and the target processing values are obtained based on the leaf data items and the original processing items; the second generation module 803 is used to generate a target data table based on the target record; the target data table is used to characterize the correspondence between the target data items, the target processing items and the target processing values.
[0118] In this embodiment, a target data table is generated based on the target record. The target record includes target data items, target processing items and target processing values. The target data items are obtained based on the original data items, the target processing items are obtained based on the original processing items, and the target processing values are obtained based on the leaf data items and the original processing items. In this way, multiple information can be integrated into a unified target data table. Compared with the method of generating a data table for each type of information, the number of data tables can be reduced, thereby improving data processing efficiency.
[0119] In some embodiments, the target data item includes at least one of the following: the original data item and a calculated data item; wherein the calculated data item is obtained by calculating the original data item.
[0120] In this embodiment, by using original data items and / or calculated data items as target data items, more flexible and comprehensive target data items can be obtained as needed, thereby making the target data table contain richer information and improving data processing accuracy.
[0121] In some embodiments, the first generating module 802 is further configured to:
[0122] In response to determining that the target data item is a leaf data item, acquiring a target processing item in a target record where the target data item is located based on the original processing item;
[0123] or,
[0124] In response to determining that the target data item is a non-leaf data item, a union of processing items corresponding to original data items at a level below the target data item is used as a target processing item in a target record where the target data item is located.
[0125] In this embodiment, the target processing item corresponding to the leaf data item is obtained based on the original processing item, and the target processing item corresponding to the non-leaf data item is obtained based on the processing item corresponding to the original data item of the next level. Different methods of obtaining the target processing item can be adopted based on whether the target data item is a leaf data item, thereby improving the accuracy of the target processing item.
[0126] In some embodiments, the target processing item includes at least one of the following: the original processing item and a post-processing item; wherein the post-processing item is obtained by performing an operation on the original processing item.
[0127] In this embodiment, by using the original processing items and / or post-processing items as target processing items, more flexible and comprehensive target processing items can be obtained as needed, thereby allowing the target data table to contain richer information and improve data processing accuracy.
[0128] In some embodiments, the first generating module 802 is further configured to:
[0129] Obtaining a leaf processing item from the original processing item, and processing the leaf data item based on the leaf processing item to obtain a leaf processing value;
[0130] Based on the leaf processing value, a target processing value in a target record is obtained.
[0131] In this embodiment, the target processing value is obtained based on the leaf processing value, so that the leaf processing value can be obtained accurately and efficiently.
[0132] In some embodiments, the first generating module 802 is further configured to:
[0133] In response to determining that the target data item is a leaf data item and the target processing item in the target record where the target data item is located is a leaf processing item, the leaf processing value corresponding to the leaf processing item of the leaf data item is used as the target processing value in the target record where the target data item is located.
[0134] In this embodiment, for leaf data items and leaf processing items, the leaf processing value is used as the target processing value of the corresponding record, so that the target processing value in this case can be accurately obtained.
[0135] In some embodiments, the first generating module 802 is further configured to:
[0136] In response to determining that the target data item is a non-leaf data item, obtain the processing value of the target processing item corresponding to the original data item at the next level of the target data item; and obtain the target data item and the target processing value in the target record where the target processing item is located by summing the obtained processing values.
[0137] In this embodiment, the target processing value corresponding to the non-leaf data item is obtained based on the processing value corresponding to the original data item at the next level, rather than being calculated based on the full amount of data. This can improve the effectiveness of the calculation and improve data processing efficiency.
[0138] In some embodiments, the first generating module 802 is further configured to:
[0139] In response to determining that the target processing item is a non-leaf processing item, the processing value of the target data item corresponding to the original processing item at the next level of the target processing item is obtained; by summing the obtained processing values, the target data item and the target processing value in the target record where the target processing item is located are obtained.
[0140] In this embodiment, the target processing value corresponding to the non-leaf processing item is obtained based on the processing value corresponding to the original processing item at the next level, rather than being calculated based on the full amount of data. This can improve the effectiveness of the calculation and improve data processing efficiency.
[0141] In some embodiments, the apparatus 800 further includes:
[0142] A processing module, configured to generate a visualization matrix based on the target data table; the rows of the visualization matrix correspond to the target data items, the columns of the visualization matrix correspond to the target processing items, and the elements of the visualization matrix correspond to the target processing values;
[0143] A display module is used to display the visualization matrix.
[0144] In this embodiment, by generating and displaying a visualization matrix, the target data items, target processing items and their corresponding target processing values can be intuitively displayed, which is convenient for users to view.
[0145] It can be understood that in the embodiments of the present disclosure, the same or similar contents in different embodiments can be referenced to each other.
[0146] It can be understood that the “first”, “second”, etc. in the embodiments of the present disclosure are only used for distinction and do not indicate the degree of importance, time sequence, etc.
[0147] It is understandable that unless there is any special limitation on the sequence of steps in the process, it means that the timing relationship between these steps is not limited.
[0148] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0149] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0150] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 900 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0151] like Fig. 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0152] Multiple components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0153] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).
[0154] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0155] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0156] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0157] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0158] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0159] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0160] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0161] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data processing method, comprising: Acquire original data items of multiple levels and original processing items corresponding to leaf data items in the original data items; generating a target record based on the original data item and the original processed item; The field values of the target record include: a target data item, a target processing item and a target processing value, wherein the target data item is obtained based on the original data item, the target processing item is obtained based on the original processing item, and the target processing value is obtained based on the leaf data item and the original processing item; A target data table is generated based on the target record; the target data table is used to characterize the correspondence between the target data items, the target processing items and the target processing values.
2. The method according to claim 1, wherein: The target data item includes at least one of the following: the original data item, the calculated data item; The calculated data item is obtained by calculating the original data item.
3. The method according to claim 1, wherein: The generating a target record based on the original data item and the original processing item comprises: In response to determining that the target data item is a leaf data item, acquiring a target processing item in a target record where the target data item is located based on the original processing item; In response to determining that the target data item is a non-leaf data item, a union of processing items corresponding to original data items at a level below the target data item is used as a target processing item in a target record where the target data item is located.
4. The method according to claim 3, wherein: The target processing item includes at least one of the following: the original processing item, the post-processing item; The post-processing item is obtained by performing a calculation on the original processing item.
5. The method according to claim 1, wherein: The generating a target record based on the original data item and the original processing item comprises: Obtaining a leaf processing item from the original processing item; Processing the leaf data item based on the leaf processing item to obtain a leaf processing value; Based on the leaf processing value, a target processing value in a target record is obtained.
6. The method according to claim 5, wherein: The obtaining, based on the leaf processing value, a target processing value in a target record includes: In response to determining that the target data item is a leaf data item and the target processing item in the target record where the target data item is located is a leaf processing item, the leaf processing value corresponding to the leaf processing item of the leaf data item is used as the target processing value in the target record where the target data item is located.
7. The method according to claim 5, wherein: The obtaining, based on the leaf processing value, a target processing value in a target record includes: In response to determining that the target data item is a non-leaf data item, obtaining a processed value of a target processed item corresponding to an original data item at a next level of the target data item; The target processing value in the target record where the target data item and the target processing item are located is obtained by performing a sum operation on the acquired processing values.
8. The method according to claim 5, wherein: The obtaining, based on the leaf processing value, a target processing value in a target record includes: In response to determining that the target processing item is a non-leaf processing item, obtaining a processing value of a target data item corresponding to an original processing item at a next level of the target processing item; The target processing value in the target record where the target data item and the target processing item are located is obtained by performing a sum operation on the acquired processing values.
9. The method according to claim 1, further comprising: Based on the target data table, generating a visualization matrix; The rows of the visualization matrix correspond to the target data items, the columns of the visualization matrix correspond to the target processing items, and the elements of the visualization matrix correspond to the target processing values; The visualization matrix is displayed.
10. A data processing device, comprising: An acquisition module, used to acquire original data items of multiple levels and original processing items corresponding to leaf data items in the original data items; A first generating module, configured to generate a target record based on the original data item and the original processing item; The field values of the target record include: a target data item, a target processing item and a target processing value, wherein the target data item is obtained based on the original data item, the target processing item is obtained based on the original processing item, and the target processing value is obtained based on the leaf data item and the original processing item; The second generating module is used to generate a target data table based on the target record; the target data table is used to characterize the correspondence between the target data items, the target processing items and the target processing values.
11. The device according to claim 10, wherein: The target data item includes at least one of the following: the original data item, the calculated data item; The calculated data item is obtained by calculating the original data item.
12. The device according to claim 10, wherein: The first generating module is further used for: In response to determining that the target data item is a leaf data item, acquiring a target processing item in a target record where the target data item is located based on the original processing item; In response to determining that the target data item is a non-leaf data item, a union of processing items corresponding to original data items at a level below the target data item is used as a target processing item in a target record where the target data item is located.
13. The device according to claim 12, wherein: The target processing item includes at least one of the following: the original processing item, the post-processing item; The post-processing item is obtained by performing a calculation on the original processing item.
14. The device according to claim 10, wherein: The first generating module is further used for: Obtaining a leaf processing item from the original processing item, and processing the leaf data item based on the leaf processing item to obtain a leaf processing value; Based on the leaf processing value, a target processing value in a target record is obtained.
15. The device according to claim 14, wherein: The first generating module is further used for: In response to determining that the target data item is a leaf data item and the target processing item in the target record where the target data item is located is a leaf processing item, the leaf processing value corresponding to the leaf processing item of the leaf data item is used as the target processing value in the target record where the target data item is located.
16. The device according to claim 14, wherein: The first generating module is further used for: In response to determining that the target data item is a non-leaf data item, obtaining a processed value of a target processed item corresponding to an original data item at a next level of the target data item; The target processing value in the target record where the target data item and the target processing item are located is obtained by performing a sum operation on the acquired processing values.
17. The device according to claim 14, wherein: The first generating module is further used for: In response to determining that the target processing item is a non-leaf processing item, obtaining a processing value of a target data item corresponding to an original processing item at a next level of the target processing item; The target processing value in the target record where the target data item and the target processing item are located is obtained by performing a sum operation on the acquired processing values.
18. The apparatus according to claim 14, further comprising: A processing module, used for generating a visualization matrix based on the target data table; The rows of the visualization matrix correspond to the target data items, the columns of the visualization matrix correspond to the target processing items, and the elements of the visualization matrix correspond to the target processing values; A display module is used to display the visualization matrix.
19. An electronic device comprising: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data information management method and device, computer equipment and storage medium
CN110069519A
Data summarization method, electronic device and computer readable storage medium
CN110309496A
Data processing method and device and computer readable storage medium
CN114020851A
Data warehouse construction method and device, electronic equipment and readable storage medium
CN115858699A
Data processing method and device, electronic equipment and storage medium
CN118012938A
