Data processing method and device, electronic equipment and storage medium
By setting extended dimensions for indicator names through a dimension mapping relationship table, the problems of high cost and poor scalability when adding new indicators to the indicator monitoring system are solved, and efficient data processing and visual table dimension editing are achieved.
Patent Information
- Application Number
- CN202511902405.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-07
AI Technical Summary
Existing indicator monitoring systems are costly and have poor scalability when integrating new indicators, requiring redesign of data acquisition links and calculation logic, which is time-consuming and labor-intensive.
By setting customizable extended dimensions for indicator names through a dimension mapping table, and adding monitoring data dimensions to a visualization table based on the target indicator value, only the dimension mapping table needs to be edited, without the need to rebuild the table or redesign the calculation chain.
It reduces labor costs and working hours, makes it easier for users to use, and improves the scalability and efficiency of the indicator monitoring system.
Smart Images

Figure CN121807956A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a data processing method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the current To C (To Consumer, for individual consumers) business model, especially the business model of the Internet industry, real-time monitoring of a large number of business indicators is often needed to support operation decision-making and system optimization, but in the related technology, when a business indicator needs to be added, the data collection link needs to be redesigned, the calculation logic needs to be redeveloped, and an independent calculation task needs to be deployed, which leads to the problem that the existing indicator monitoring system has high cost of accessing indicators and poor expansibility, and the process of accessing indicators is time-consuming and laborious. SUMMARY
[0003] The present application provides a data processing method and device, electronic equipment and storage medium to solve the problem that the indicator monitoring system has high cost of accessing indicators and poor expansibility.
[0004] In a first aspect, the present application provides a data processing method, comprising: obtaining original business data, determining a target indicator name to be processed and a target general dimension; determining at least one target extended dimension corresponding to the target indicator name according to a pre-set dimension mapping relationship table; the dimension mapping relationship table is configured to update the mapping relationship entries between the indicator names and the user-defined extended dimensions in the dimension mapping relationship table according to user needs, and the extended dimension is a dimension supported by a visualization table; determining the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension according to the original business data corresponding to the target indicator name; updating the visualization table according to the target general dimension, the target extended dimension and the corresponding indicator values.
[0005] The data processing method provided in the embodiment can set corresponding extended dimensions for index names, can only process the original business data corresponding to the target index name after obtaining the original business data, can reduce the processor pressure, and can add the data dimension monitored by the target extended dimension corresponding to the target index value to the visual table, and the table header in the visual table corresponds to each target extended dimension; the corresponding relationship between the index name and the extended dimension is represented by using the dimension mapping relationship table, the target extended dimension corresponding to the target index value can be edited by editing the dimension mapping relationship table in advance, when it is necessary to edit the corresponding data dimension of the visual table, the editing of the related dimensions in the visual table can be realized by editing the dimension mapping relationship table, without the need to rebuild the table and design the calculation link, so that the manual cost and the working time are reduced, and the user can use conveniently.
[0006] In an optional implementation, the method further includes: obtaining an editing instruction for editing a target mapping relationship entry in the dimension mapping relationship table; editing an extended dimension corresponding to the target mapping relationship entry according to the editing instruction.
[0007] In an optional implementation, the editing of the extended dimension corresponding to the target mapping relationship entry according to the editing instruction includes: in a case where the editing instruction is an instruction of adding a first extended dimension, defining an extension field in the target mapping relationship entry as the first extended dimension; in a case where the editing instruction is an instruction of modifying a second extended dimension, modifying the second extended dimension that has been defined in the extension field in the target mapping relationship entry to a third extended dimension; in a case where the editing instruction is a deletion instruction, deleting an extended dimension corresponding to the extension field in the target mapping relationship entry.
[0008] In an optional implementation, the determination of the index value of the target general dimension and the index value corresponding to the target extended dimension according to the original business data corresponding to the target index name includes: filtering out target data corresponding to a target field from the original business data corresponding to the target index name; the target field includes a field corresponding to the target general dimension and a field corresponding to the target extended dimension; determining the index value of the target general dimension and the index value corresponding to the target extended dimension according to the target data.
[0009] In an optional implementation, the determination of the index value of the target general dimension and the index value corresponding to the target extended dimension according to the target data includes: group the target data as the target general dimension and the target extended dimension as grouping conditions; count the count value in each group, and take the count value of the corresponding group as the index value corresponding to the target general dimension and the target extended dimension.
[0010] In an optional implementation, the target field further includes a home field and / or a time field, and the updating the visualization table includes: updating the table content corresponding to the home table header in the visualization table according to the home identifier corresponding to the home field in the target data.
[0011] and / or, updating the table content corresponding to the time table header in the visualization table according to the time identifier corresponding to the time field in the target data.
[0012] In an optional implementation, in the case that there is no corresponding relationship between the target index name and the extended dimension, each extended table header in the visualization table is an undefined table header, and the method further includes: updating the visualization table according to the target general dimension and the corresponding index value.
[0013] The data processing method provided in this embodiment sets the corresponding extended dimension for the index name by obtaining the editing instruction for editing the target mapping relationship entry in the dimension mapping relationship table, adds the data dimension monitored by the visualization table according to the target extended dimension corresponding to the target index name, and correspondingly generates the table header in the visualization table; then the original data corresponding to the target index name is grouped and processed to obtain the index value corresponding to each target general dimension and target extended dimension, which is updated to the visualization table. By editing the pre-set dimension mapping relationship table, the target extended dimension corresponding to the target index value can be modified, added or deleted. When it is necessary to newly add, modify or delete the corresponding data dimension of the visualization table, the dimension mapping relationship table only needs to be edited, and the table needs not to be rebuilt and the calculation link needs not to be designed, thereby reducing the labor cost and working time and facilitating the use of the user.
[0014] In a second aspect, the present application provides a data processing device, comprising: an original data acquisition module, configured to acquire original business data and determine a target index name and a target general dimension to be processed.
[0015] The extension dimension determination module is configured to determine at least one target extension dimension corresponding to the target indicator name according to a preset dimension mapping relationship table. The dimension mapping relationship table is configured to update the mapping relationship entries between the indicator names and the user-defined extension dimensions in the dimension mapping relationship table according to the user demand, and the extension dimension is a dimension supported by the visualization table.
[0016] The indicator value calculation module is configured to determine the indicator value of the target general dimension and the indicator value corresponding to the target extension dimension according to the original business data corresponding to the target indicator name.
[0017] The table generation module is configured to update the visualization table according to the target general dimension, the target extension dimension and the corresponding indicator values.
[0018] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data processing method of the first aspect or any of the corresponding embodiments thereof.
[0019] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the data processing method of the first aspect or any of the corresponding embodiments thereof.
[0020] In a fifth aspect, the present application provides a computer program product, which comprises computer instructions, and the computer instructions are used to make a computer execute the data processing method of the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0022] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application; Figure 2 is a first flowchart of a data processing method according to an embodiment of the present application; Figure 3 is a second flowchart of a data processing method according to an embodiment of the present application; Figure 4 is a schematic diagram of generating corresponding indicator values according to an embodiment of the present application; Figure 5This is a schematic diagram of a JSON structure for data processing according to an embodiment of the present invention; Figure 6 This is a flowchart of a data access method according to an embodiment of the present invention; Figure 7 This is a schematic diagram of a dimension mapping table according to an embodiment of the present invention; Figure 8 This is a structural block diagram of a data processing apparatus according to an embodiment of the present invention; Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0025] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0026] As an optional application scenario of this invention, such as Figure 1 As shown, the data processing system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.
[0027] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.
[0028] In related technologies, the header of the monitoring system's storage table is the concrete name of the indicator. If a business indicator with a different dimension needs to be added, it is often necessary to rebuild a storage table. For example, if the header of the original table is "city", and a business indicator with the dimension of "gender" needs to be added, a new storage table needs to be built. The header of the newly built storage table includes "city" and "gender", and the calculation links of the original storage table need to be migrated, which is time-consuming and labor-intensive.
[0029] This invention provides a data processing method that sets a definable extended dimension for an indicator name through a dimension mapping table, and adds a monitoring data dimension to a visualization table according to the target extended dimension corresponding to the target indicator value, so that when it is necessary to edit the corresponding data dimension of the visualization table, only the dimension mapping table needs to be edited.
[0030] According to an embodiment of the present invention, a data processing method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0031] This embodiment provides a data processing method that can be used in the aforementioned terminal devices, such as desktop computers, mobile phones, tablet computers, etc. Figure 2 This is a flowchart of a data processing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the original business data and determine the target metric name and target general dimension to be processed.
[0032] Raw business data refers to data acquired during the business process. For example, in terms of click count, each click by a user on the client side constitutes one piece of raw business data, and multiple click data constitute the raw business data. It's understandable that raw business data may include not only click count data but also data such as page views and page view duration. When processing raw business data, it's necessary to determine the target metric name to be processed, which is the specific metric name in the final generated visualization table. For example, the target metric name could be click count. After determining the target metric name, processing can be performed only on the raw business data corresponding to that target metric, reducing the processor load.
[0033] The target general dimension is a dimension that will always be present in data statistics. For example, when displaying click volume, it is necessary to determine the click volume for each city; in this case, the target general dimension is the city. In this embodiment, the target general dimension can be a default general dimension, or it can be a general dimension generated or configured according to data processing requirements.
[0034] Step S202: Based on a pre-defined dimension mapping table, determine at least one target extended dimension corresponding to the target metric name. The dimension mapping table is configured to update the mapping entries between the metric name and the user-defined extended dimensions according to user needs, and the extended dimensions are dimensions supported by the visualization table.
[0035] A dimension mapping table can be stored on the server. In this table, each metric name can correspond to at least one extended dimension. Based on this table, the target extended dimension corresponding to the target metric name to be processed can be determined. In this embodiment, the dimension mapping table can be stored in a database, such as a MySQL database. For the monitor, the dimension mapping table can be configured in the database, specifying the correspondence between each metric name and its extended dimensions. The correspondence between a single metric name and an extended dimension can be edited through mapping entries, and a single metric name can correspond to multiple mapping entries, i.e., multiple extended dimensions.
[0036] The visualization table can include multiple undefined headers. These undefined headers can be defined based on the extended dimensions associated with the target metric name in the dimension mapping table. For example, if the target metric is clicks and the target general dimension is city, the headers in the visualization table corresponding to clicks (i.e., the target metric name) could include "City," "Undefined Extended Dimension 1," "Undefined Extended Dimension 2," and "Undefined Extended Dimension 3." However, in the dimension mapping table, the clicks (i.e., the target metric name) are mapped to Extended Dimension 1 (e.g., user gender is female), resulting in headers such as "City," "Female," "Undefined Extended Dimension 2," and "Undefined Extended Dimension 3."
[0037] Step S203: Based on the original business data corresponding to the target indicator name, determine the indicator values for the target general dimension and the target extended dimension.
[0038] In the previous step, after determining at least one target extended dimension corresponding to the target metric name, the metric value corresponding to the target general dimension and the metric value corresponding to the target extended dimension can be determined in the original business data corresponding to the target metric name.
[0039] For example, when the target general dimension is city, the indicator value for each city is determined from the original business data corresponding to the target indicator name. The indicator value corresponds to the target indicator name; for example, if the target indicator name is click volume, then the indicator value is the numerical value that represents the click volume. During the calculation process, the indicator value can be calculated using methods such as summation or averaging.
[0040] Step S204: Update the visualization table based on the target general dimension, target extended dimension, and corresponding indicator values.
[0041] After obtaining the metric values corresponding to the target general dimension, the corresponding data in the existing visualization table can be updated. For the metric values corresponding to the target extended dimension, it can be first determined whether a corresponding header exists in the visualization table. For example, if the target extended dimension is "user gender is female", the header in the corresponding position of the visualization table can be set to "female", and then the metric values corresponding to the target extended dimension can be updated to the corresponding positions in the table. In order to facilitate the viewing of the visualization table by the monitor, undefined extended dimensions in the visualization table can be hidden, such as "undefined extended dimension 2" and "undefined extended dimension 3" mentioned above.
[0042] The data processing method provided in this embodiment, by setting corresponding extended dimensions for indicator names, allows processing only the original business data corresponding to the target indicator name after acquiring the original business data, reducing processor load. It also adds monitoring data dimensions to the visualization table based on the target extended dimensions corresponding to the target indicator value, with the table headers corresponding to each target extended dimension. A dimension mapping table represents the correspondence between indicator names and extended dimensions. By editing the pre-defined dimension mapping table, the target extended dimensions corresponding to the target indicator value can be edited. When it is necessary to edit the corresponding data dimensions in the visualization table, only the dimension mapping table needs to be edited to achieve the editing of the relevant dimensions in the visualization table, without needing to rebuild the table or design the calculation chain, reducing labor costs and working time, and making it convenient for users.
[0043] This embodiment provides a data processing method that can be used in the aforementioned terminal devices, such as desktop computers, mobile phones, tablet computers, etc. Figure 3 This is a flowchart of a data processing method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain the original business data and determine the target metric name and target general dimension to be processed.
[0044] Please see details Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0045] Step S302: Based on the pre-defined dimension mapping table, determine at least one target extended dimension corresponding to the target metric name. The dimension mapping table is configured to update the mapping entries between the metric name and the user-defined extended dimension according to user needs, and the extended dimension is a dimension supported by the visualization table.
[0046] Please see details Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0047] Step S303: Based on the original business data corresponding to the target indicator name, determine the indicator values for the target general dimension and the target extended dimension.
[0048] Please see details Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0049] In some optional implementations, step S303, "determining the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension based on the original business data corresponding to the target indicator name," includes steps a1 and a2.
[0050] Step a1: Filter the target data corresponding to the target fields from the original business data corresponding to the target metric name. Target fields include fields corresponding to the target general dimensions and fields corresponding to the target extended dimensions.
[0051] After initially filtering the raw business data based on the target metric name, since the metric values corresponding to the target general dimension and the target extended dimension need to be displayed in the visualization table, the target fields can be determined through the target general dimension and the target extended dimension. These are the fields corresponding to the target general dimension and the target extended dimension in the visualization table. For ease of description, the target general dimension and the target extended dimension can be collectively referred to as monitoring dimensions. Because there is other monitoring dimension information in the raw business data, such as viewing time, which does not belong to either the target general dimension or the target extended dimension, these other monitoring dimensions can be removed, retaining only the target data related to the target general dimension or the target extended dimension.
[0052] Step a2: Determine the corresponding indicator values for the target general dimension and the target extended dimension based on the target data.
[0053] After filtering the original business data according to the target fields, the indicator values of each target field can be determined according to the target data corresponding to each target field in the original business data. That is, the indicator values corresponding to the target general dimension and the target extended dimension.
[0054] In some optional implementations, step a2, "determining the index values of the target general dimension and the index values corresponding to the target extended dimension based on the target data", includes steps a21 and a22.
[0055] Step a21: Group the target data using the target general dimension and the target extended dimension as grouping conditions.
[0056] In determining the indicator values for the target general dimension and the target extended dimension of the target data, the target general dimension and the target extended dimension can be used as grouping conditions. That is, for each target general dimension or target extended dimension, the corresponding data group is selected in the target data, and the grouping conditions are the target general dimension and the target extended dimension. For example, for a target extended dimension of "user gender is female", all records of users whose gender is female in the original business data can be filtered and used as the group corresponding to this target extended dimension for subsequent indicator value calculation. In addition, the target general dimension and the target extended dimension can also be combined during the grouping process, and then the target data can be grouped. For example, if the target general dimension is "City A" and the target extended dimension is "user gender is female", then the data in the target data that is in City A and whose user gender is female can be grouped for indicator value calculation.
[0057] Step a22: Count the values within each group and use the count values of the corresponding groups as the indicator values for the target general dimension and the target extended dimension.
[0058] Target data is similar to raw business data, also composed of multiple data points. For example, in terms of click volume, each click by a user on the client is one data point in the target data. After grouping as described above, we can statistically analyze the data within each group to determine the count value of each group (e.g., the amount of data within a group) and use it as the corresponding indicator value for that group. For example, if the target general dimension is "City A" and the count value is 100, then the indicator value for the target general dimension "City A" is 100. However, the count value for "City A, and the user's gender is female" is 60, so the indicator value for that group is 60.
[0059] Figure 4 This is a diagram illustrating the generation of corresponding indicator values, such as... Figure 4 As shown, the Flink computing engine used in this embodiment first receives data from the data access module, calculates the corresponding indicator values for each group, then performs data format transformation according to a general design (i.e., generates a visual table), and finally sends the visual table to the downstream monitoring system for monitoring personnel to view. A detailed introduction to the data access module will follow. Figure 6 Partial introduction.
[0060] Step S304: Update the visualization table based on the target general dimension, target extended dimension, and corresponding indicator values.
[0061] Please see details Figure 2 Step S204 of the illustrated embodiment will not be described again here.
[0062] In some optional implementations, the target field may also include an attribution field and / or a time field, and step S304 "update visualization table" includes steps b1 and / or b2.
[0063] Step b1: Update the table content corresponding to the attribution header in the visualization table based on the attribution identifier corresponding to the attribution field in the target data.
[0064] In some cases, the target field can also include a category field. In this case, the visualization table can also include the category header corresponding to the category field. The value of the category header in the visualization table is the category identifier corresponding to the target data. During implementation, since not all departments need all data, the department can be used as the category identifier. For example, if the category identifier is Department A, then the data in the visualization table whose category header corresponds to Department A is all the data required by Department A. The target data itself contains the category identifier, and during the updating of the visualization table, the category identifier can also be updated in the table content corresponding to the category header.
[0065] Step b2: Update the table content corresponding to the time header in the visualization table according to the time identifier corresponding to the time field in the target data.
[0066] It's understandable that the target field can also include a time field, in which case the visualization table can also include the corresponding time header. For example, the time identifier in the target data can be updated to the table content corresponding to the time header in the visualization table, representing the data acquisition time, import time, or visualization table generation time, etc.
[0067] In practical applications, a visual table can be constructed using a JSON structure, which can be as follows: { "dept_code":"", "metric_name":"", "value":"", "process_time":"", "adname":"", "data": { "ext1":"", "ext2":"", "ext3":"", } } Among them, the dept_code field is the belonging field; the metric_name field is the metric name field; the value field is the metric value field corresponding to the metric name; the process_time field is the time field; the adname field is the target general dimension; and the ext1, ext2, and ext3 fields in the data field are pre-defined extended fields. After system initialization, the pre-defined extended fields can be empty.
[0068] For example, if we need to generate a visualization table belonging to department A, with the metric name "click count", the general target dimensions being cities B and C, and the extended target dimension being "users are female", then the JSON structure of this visualization table would be as follows: { "dept_code":"Department A", "metric_name":"Click Count", "value":"", "process_time":"", "adname":["City B","City C"], "data": { "ext1":"The user is female", "ext2":"", "ext3":"", } } The `dept_code`, `metric_name`, and `adname` fields can be set according to the monitor's needs. The `value` and `process_time` fields will be automatically filled with their corresponding values. The value "User is female" for the extended field `ext1` is the extended dimension corresponding to this extended field, determined by the extended dimension corresponding to the `metric_name` field in the dimension mapping table. Furthermore, the extended fields `ext2` and `ext3` do not have corresponding extended dimensions; they are undefined extended dimensions. After completing the JSON structure construction, the header of the visualization table can be generated based on the fields contained in the JSON structure. It is understandable that when generating other visualization tables, such as a visualization table where the attribution field is "Department D" and the metric name is "Views," the JSON structure can be adjusted to match the fields with the requirements, allowing each table to correspond to a single JSON structure.
[0069] Figure 5 This is a schematic diagram of a JSON structure for data processing, such as... Figure 5As shown, the outer JSON structure can include an indicator attribution field (i.e., the attribution field), an indicator name field (i.e., the indicator name), an indicator value (used to store the total indicator value corresponding to the target indicator name), a time field, and a concrete indicator general dimension (i.e., the general dimension). The inner JSON structure contains various extended dimensions corresponding to the indicator name.
[0070] Figure 6 It is a flowchart of data access, such as Figure 6 As shown, the original business data is determined by the heterogeneous data sources accessed by the various connectors defined in the Flink computing engine. Then, the original business data is processed to determine common attributes, such as the attribution field. At the same time, the fields corresponding to the time field, the general dimension, and the extended dimension (the subdivision dimension in the figure) are determined. The processed data is then grouped and passed to the indicator calculation module for indicator value calculation.
[0071] In some optional implementations, the data processing method further includes steps S305 and S306.
[0072] Step S305: Obtain the editing instructions for editing the target mapping relationship entries in the dimension mapping relationship table.
[0073] As mentioned earlier, the monitor can edit the dimension mapping table. During the editing process, it is necessary to obtain the editing instructions for editing the dimension mapping table. Since the dimension mapping table includes at least one mapping entry, the editing instructions are also aimed at the corresponding mapping editing entry, i.e., the target mapping entry.
[0074] Step S306: Edit the extended dimension corresponding to the target mapping relationship entry according to the editing instructions.
[0075] After obtaining the relational instructions for the target mapping relationship entry, the extended dimensions in the target mapping relationship entry can be edited. The editing instructions can include specific instructions on how to edit the extended dimensions, such as adding the extended dimensions to the target mapping relationship entry to define the extended dimensions.
[0076] In some alternative implementations, step S306 includes steps c1 to c3.
[0077] Step c1: If the editing command is to add a first extended dimension, define the extended field in the target mapping relationship entry as the first extended dimension.
[0078] Step c2: If the editing command is to modify the second extended dimension, change the defined second extended dimension in the extended field of the target mapping relationship entry to the third extended dimension.
[0079] Step c3: If the editing command is a delete command, delete the extended dimension corresponding to the extended field in the target mapping relationship entry.
[0080] In this embodiment, the indicator name can be pre-assigned to multiple extended fields, where the extended fields are predefined placeholders used to construct the correspondence between indicator names and extended dimensions in the dimension mapping table, such as ext1 in the JSON structure mentioned earlier. However, since the extended field is undefined, it also corresponds to an undefined extended dimension. When the edit command is a "new" command, that is, when adding a first extended dimension corresponding to an indicator name, an undefined extended field corresponding to that indicator name can be defined as the first extended dimension.
[0081] When the edit command is a modification command, it can change the extended field in the target mapping relationship entry, which is already defined as the second extended dimension, to the third extended dimension as the modification target. It can be understood that a modification command can include a third extended dimension.
[0082] When the edit command is a delete command, the extended fields that have been defined as extended dimensions in the target mapping relationship entry can be deleted. That is, after deletion, the extended fields in the target mapping relationship entry will be updated to undefined extended dimensions.
[0083] Figure 7 This is a schematic diagram of a dimension mapping table, such as... Figure 7 As shown, the dimension mapping table can contain multiple mapping entries. Each entry contains a mapping relationship between an indicator name (e.g., indicator name 1 in the figure), an extended field (e.g., ext1 in the figure), and an extended dimension (e.g., extended dimension 1 in the figure, which could be "user gender is female"). After determining the target indicator name, the corresponding extended field and extended dimension can be determined. The extended dimension can be an undefined extended dimension.
[0084] In some optional implementations, where there is no correspondence between the target metric name and the extended dimensions, the various extended headers in the visualization table are undefined headers, and the method further includes step d1.
[0085] Step d1: Update the visualization table based on the target general dimensions and corresponding indicator values.
[0086] In some cases, there is no correspondence between the target metric name and the extended dimensions. That is, in the dimension mapping table, the extended dimensions corresponding to the target metric name are all undefined extended dimensions. In this case, it is not necessary to obtain the metric value corresponding to the extended dimension. That is, the target field only includes the field corresponding to the target general dimension. In the grouping process, it is only necessary to use the target general dimension as the grouping condition to group the target data, obtain the metric value corresponding to the target general dimension, and update it to the visualization table.
[0087] The data processing method provided in this embodiment sets corresponding extended dimensions for indicator names by obtaining editing instructions for editing target mapping relationship entries in the dimension mapping relationship table. Based on the target extended dimensions corresponding to the target indicator names, it adds monitoring data dimensions to the visualization table and generates the corresponding table header. Then, it groups the original data corresponding to the target indicator names to obtain the indicator values corresponding to each target general dimension and target extended dimension, which are then updated in the visualization table. By editing the pre-set dimension mapping relationship table, target extended dimensions corresponding to target indicator values can be modified, added, or deleted. When it is necessary to add, modify, or delete corresponding data dimensions in the visualization table, only the dimension mapping relationship table needs to be edited, without recreating the table or designing the calculation chain, reducing labor costs and working time, and making it convenient for users.
[0088] This embodiment also provides a data processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0089] This embodiment provides a data processing device, such as... Figure 8 As shown, it includes: The raw data acquisition module 801 is used to acquire raw business data and determine the target indicator name and target general dimension to be processed.
[0090] The extended dimension determination module 802 is used to determine at least one target extended dimension corresponding to the target metric name based on a pre-defined dimension mapping table. The dimension mapping table is configured to update the mapping entries between the metric name and the user-defined extended dimension according to user needs, and the extended dimension is a dimension supported by the visualization table.
[0091] The indicator value calculation module 803 is used to determine the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension based on the original business data corresponding to the target indicator name.
[0092] The table generation module 804 is used to update the visualization table based on the target general dimension, target extended dimension and corresponding indicator value.
[0093] In some optional embodiments, the data processing apparatus further includes: The editing instruction acquisition module is used to acquire editing instructions for editing target mapping relationship entries in the dimension mapping relationship table.
[0094] The mapping adjustment module is used to edit the extended dimensions corresponding to the target mapping entries according to the editing instructions.
[0095] In some optional implementations, the mapping adjustment module includes: A new mapping relationship submodule has been added, which is used to define the extended fields in the target mapping relationship entry as the first extended dimension when the editing command is to add the first extended dimension.
[0096] The Modify Mapping Relationship submodule is used to change the defined second extended dimension to the third extended dimension in the extended field of the target mapping relationship entry when the editing command is to modify the second extended dimension.
[0097] The Delete Mapping Relationship submodule is used to delete the extended dimensions corresponding to the extended fields in the target mapping relationship entry when the edit command is a delete command.
[0098] In some optional implementations, the index value calculation module 803 includes: The target field determination submodule is used to filter out the target data corresponding to the target field from the original business data corresponding to the target metric name. The target fields include the fields corresponding to the target general dimension and the fields corresponding to the target extended dimension.
[0099] The indicator value calculation submodule is used to determine the indicator values corresponding to the target general dimension and the target extended dimension based on the target data.
[0100] In some optional implementations, the index value calculation submodule includes: Grouping unit, used to group target data based on the target common dimension and target extended dimension.
[0101] The indicator value calculation unit is used to count the count values within each group and use the count values of the corresponding group as the indicator values corresponding to the target general dimension and the target extended dimension.
[0102] In some optional implementations, the target field may also include an attribution field and / or a time field, and the table generation module 804 includes: The attribution identifier update submodule is used to update the table content corresponding to the attribution header in the visualization table based on the attribution identifier corresponding to the attribution field in the target data.
[0103] And / or, The Time Label Update submodule is used to update the table content corresponding to the time header in the visualization table based on the time label corresponding to the time field in the target data.
[0104] In some optional implementations, where there is no correspondence between the target metric name and the extended dimensions, the various extended headers in the visualization table are undefined headers, and the data processing device further includes: The table update module is used to update the visualization table based on the target general dimensions and the corresponding indicator values.
[0105] The data processing apparatus provided in this embodiment of the invention can execute the data processing method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0106] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0107] The following is a detailed reference. Figure 9 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 901, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 902 or a program loaded from memory 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device. The processor 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0108] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 9 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0109] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a memory 908, or installed from a ROM 902. When the computer program is executed by a processor 901, it performs the functions defined in the methods of the embodiments of the present invention.
[0110] Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0111] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the data processing methods shown in the above embodiments are implemented.
[0112] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0113] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A data processing method, characterized in that, The method includes: Obtain raw business data and determine the target metric name and target general dimension to be processed; Based on a pre-defined dimension mapping table, at least one target extended dimension corresponding to the target metric name is determined; the dimension mapping table is configured to update the mapping entries between the metric name and the user-defined extended dimension according to user needs, and the extended dimension is a dimension supported by the visualization table. Based on the original business data corresponding to the target indicator name, determine the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension; The visualization table is updated based on the target general dimension, the target extended dimension, and the corresponding indicator values.
2. The method according to claim 1, characterized in that, The method further includes: Obtain editing instructions for editing the target mapping relationship entries in the dimension mapping relationship table; Edit the extended dimension corresponding to the target mapping relationship entry according to the editing instructions.
3. The method according to claim 2, characterized in that, The step of editing the extended dimension corresponding to the target mapping relationship entry according to the editing instructions includes: When the editing instruction is to add a first extended dimension, the extended field in the target mapping relationship entry is defined as the first extended dimension; When the editing instruction is to modify the second extended dimension, the defined second extended dimension in the extended field of the target mapping relationship entry is modified to the third extended dimension; When the edit command is a delete command, delete the extended dimension corresponding to the extended field in the target mapping relationship entry.
4. The method according to claim 1, characterized in that, The step of determining the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension based on the original business data corresponding to the target indicator name includes: Target data corresponding to the target fields are filtered out from the original business data corresponding to the target metric name; the target fields include fields corresponding to the target general dimension and fields corresponding to the target extended dimension; Based on the target data, determine the indicator values corresponding to the target general dimension and the target extended dimension.
5. The method according to claim 4, characterized in that, The step of determining the indicator values for the target general dimension and the target extended dimension based on the target data includes: The target data is grouped using the target general dimension and the target extended dimension as grouping conditions; Count the values within each group, and use the count values of the corresponding groups as the indicator values corresponding to the target general dimension and the target extended dimension.
6. The method according to claim 4, characterized in that, The target field also includes an attribution field and / or a time field, and updating the visualization table includes: Based on the attribution identifier corresponding to the attribution field in the target data, update the table content corresponding to the attribution header in the visualization table; And / or, Update the table content corresponding to the time header in the visualization table based on the time identifier corresponding to the time field in the target data.
7. The method according to claim 1, characterized in that, If there is no correspondence between the target metric name and the extended dimensions, and the extended headers in the visualization table are undefined headers, the method further includes: The visualization table is updated based on the target general dimensions and the corresponding indicator values.
8. A data processing apparatus, characterized in that, The device includes: The raw data acquisition module is used to acquire raw business data and determine the target metric name and target general dimension to be processed; The extended dimension determination module is used to determine at least one target extended dimension corresponding to the target indicator name according to a pre-set dimension mapping relationship table; the dimension mapping relationship table is configured to update the mapping relationship entries between the indicator name and the user-defined extended dimension in the dimension mapping relationship table according to user needs, and the extended dimension is a dimension supported by the visualization table. The indicator value calculation module is used to determine the indicator value of the target general dimension and the indicator value corresponding to the target extended dimension based on the original business data corresponding to the target indicator name. The table generation module is used to update the visualization table based on the target general dimension, the target extended dimension, and the corresponding indicator value.
9. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data processing method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the data processing method according to any one of claims 1 to 7.