Data processing method and device, readable storage medium and program product
Through automated data processing methods, by selecting the analysis dimension and combining its enable state, it solves the inefficient problem caused by artificially writing SQL query data, and achieves the efficiency of rapid analysis and positioning data abnormal.
Patent Information
- Application Number
- CN202411363141.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-28
AI Technical Summary
Currently, when data abnormalities occur, you need to rely on the professional knowledge of technicians to manually write SQL query data, resulting in low data analysis efficiency.
Provide a data processing method. By obtaining the analysis data to be analyzed, select the target field as the analysis dimension, the combination of analysis dimension is enabled, determine the dimension combination, and analyze the data based on the dimension combination. Between leveling relationships.
Through automated data analysis processes, improve data analysis efficiency, reduce manual intervention, and can give different dimensions of combinations poorly according to different combinations of analysis dimensions, and then quickly locate the root cause of data abnormalities.
Smart Images

Figure CN119377247A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] This section is intended to provide a background or context to implementations of the embodiments of the invention as set forth in the claims and detailed description. No description herein is admitted to be prior art by inclusion in this section.
[0003] With the advent of the cloud computing era, business operations and decision-making processes increasingly rely on in-depth understanding and accurate analysis of massive amounts of data. With the surge in data volume and the diversification of data sources, how to efficiently collect, store, process and extract valuable information has become an important challenge facing enterprises. In this context, it is inevitable to apply some data analysis methods.
[0004] Currently, when data anomalies occur, it is necessary to rely on the expertise of technical personnel to manually write SQL queries for data, and further write SQL queries for data based on the query results. This method consumes a lot of manpower and time, and has low data analysis efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide a data processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve data analysis efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a data processing method, comprising:
[0007] Acquire data to be analyzed, where the data to be analyzed includes dimension fields and metric fields;
[0008] Selecting a target field from the dimension fields as an analysis dimension, combining the enabled states of the analysis dimensions, and determining a dimension combination;
[0009] Analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination;
[0010] According to the status code of the dimension combination, a cascade relationship between dimension combinations is established.
[0011] In a second aspect, the present application further provides a data processing device, comprising:
[0012] An acquisition module is used to acquire data to be analyzed, wherein the data to be analyzed includes dimension fields and metric fields;
[0013] A combination module, used to select a target field from the dimension fields as an analysis dimension, combine the enabled states of the analysis dimensions, and determine a dimension combination;
[0014] An analysis module, configured to analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination, to obtain the derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination;
[0015] The cascade module is used to establish a cascade relationship between dimension combinations according to the status codes of the dimension combinations.
[0016] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0017] Acquire data to be analyzed, where the data to be analyzed includes dimension fields and metric fields;
[0018] Selecting a target field from the dimension fields as an analysis dimension, combining the enabled states of the analysis dimensions, and determining a dimension combination;
[0019] Analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination;
[0020] According to the status code of the dimension combination, a cascade relationship between dimension combinations is established.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0022] Acquire data to be analyzed, where the data to be analyzed includes dimension fields and metric fields;
[0023] Selecting a target field from the dimension fields as an analysis dimension, combining the enabled states of the analysis dimensions, and determining a dimension combination;
[0024] Analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination;
[0025] According to the status code of the dimension combination, a cascade relationship between dimension combinations is established.
[0026] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0027] Acquire the data to be analyzed, where the data to be analyzed includes dimension fields and metric fields;
[0028] Selecting a target field from the dimension fields as an analysis dimension, combining the enabled states of the analysis dimensions, and determining a dimension combination;
[0029] Analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination;
[0030] According to the status code of the dimension combination, a cascade relationship between dimension combinations is established.
[0031] The above-mentioned data processing method, device, computer equipment, computer-readable storage medium and computer program product obtain data to be analyzed, wherein the data to be analyzed includes dimension fields and metric fields; select a target field from the dimension fields as an analysis dimension, combine the enabled status of each analysis dimension, and determine a dimension combination; analyze the metric field of the data to be analyzed based on the enabled analysis dimensions in each dimension combination, obtain the derived data of the data to be analyzed and the status code of each dimension combination, wherein the status code reflects the enabled analysis dimension in the dimension combination; and establish a cascade relationship between dimension combinations according to the status code of the dimension combination. In this way, different dimension combinations can be exhaustively enumerated according to the combination of different enabling modes of the analysis dimensions, and the enabled status of each analysis dimension in the dimension combination can be identified by the status code, and the cascade relationship between the dimension combinations can be established based on the status code. When data analysis is to be performed, the upper and lower dimension combinations can be determined according to the analyzed dimension combination combined with the cascade relationship, thereby improving the efficiency of data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 An application environment diagram of a data processing method in an embodiment;
[0034] Figure 2 is a flow chart of a data processing method in one embodiment;
[0035] Figure 3 is a schematic diagram of the cascading relationship between dimension combinations in one embodiment;
[0036] Figure 4 is a flow chart of a data processing method in another embodiment;
[0037] Figure 5 is a structural block diagram of a data processing device in one embodiment;
[0038] Figure 6 is another structural block diagram of a data processing device in one embodiment;
[0039] Figure 7 is an internal structure diagram of a computer device in one embodiment;
[0040] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used in the description of the present application. If there is a description of the first and the second, it is only for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0042] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0043] See also Figure 1 , Figure 1 FIG. 1 is an application environment diagram of a data processing method in an embodiment. The data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other servers.
[0044] Both the terminal and the server can be used independently to execute the data processing method provided in the embodiments of the present application.
[0045] For example, the server obtains the data to be analyzed, which includes dimension fields and metric fields; the server selects the target field from the dimension field as the analysis dimension, combines the enabled status of each analysis dimension, and determines the dimension combination. The server analyzes the metric field of the data to be analyzed based on the enabled analysis dimensions in each dimension combination, and obtains the derived data of the data to be analyzed and the status code of each dimension combination, and the status code reflects the enabled analysis dimension in the dimension combination. The server establishes a cascading relationship between dimension combinations based on the status code of the dimension combination.
[0046] In addition, the terminal and the server can also be used together to execute the data processing method provided in the embodiments of the present application.
[0047] For example, the terminal obtains the data to be analyzed, which includes dimension fields and metric fields; the terminal selects the target field from the dimension field as the analysis dimension, combines the enabled status of each analysis dimension, and determines the dimension combination. The server analyzes the metric field of the data to be analyzed based on the enabled analysis dimensions in each dimension combination, and obtains the derived data of the data to be analyzed and the status code of each dimension combination, and the status code reflects the enabled analysis dimension in the dimension combination. The server establishes a cascading relationship between dimension combinations based on the status code of the dimension combination.
[0048] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an IoT device, and a portable wearable device. The IoT device may be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.
[0049] The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0050] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.
[0051] In an exemplary embodiment, Figure 2 As shown, a data processing method is provided, which is applied to Figure 1 The server in the example is used to illustrate, including the following steps S202 to S210. Among them:
[0052] Step S202, obtaining data to be analyzed.
[0053] The data to be analyzed includes dimension fields and measurement fields. According to the different meanings described by the fields, the fields to be analyzed are divided into dimension fields and measurement fields. Dimension fields are categorized fields, that is, fields used to describe what the problem is. Dimension fields can be names of people, places, gerunds, English, text-type numbers, other types, mixed types, etc. Measurement fields are quantitative fields, that is, fields that describe how much in terms of quantity. Measurement fields can be numbers, percentages, etc.
[0054] In an embodiment of the present invention, it is determined which fields belong to dimension fields and which fields belong to measurement fields according to the types of each field in the data table to be analyzed. The type of the field can be a date and time type, a date type, a time type, a string type, a numerical type, etc. Usually, fields of date and time type, date type, time type, and string type belong to dimension fields, and fields of numerical type belong to measurement fields. It should be noted that the types of dimension fields and measurement fields can be set according to actual needs and are not specifically limited here.
[0055] Please refer to Table 1, which is a table of data to be analyzed. Taking Table 1 as an example, the data to be analyzed contains 5 fields, namely income, cost, dept, dev, and test. Among them, "department", "development team", and "test team" are dimension fields, and "income" and "cost" are measurement fields.
[0056] Table 1
[0057]
[0058] Each department contains multiple development teams and test teams. For example, dev_1_A and test_1_A belong to dept_1, dev_2_A and test_2_B belong to dept_2, and so on.
[0059] Step S204: Select a target field from the dimension fields as an analysis dimension, combine the enabled states of the analysis dimensions, and determine a dimension combination.
[0060] Analysis dimensions refer to the dimensions for analyzing the measurement fields in the data to be analyzed, including but not limited to statistical sums, comparison differences, average calculations, etc. Analysis dimensions are selected from dimension fields. According to analysis needs, one or more target fields can be selected from the dimension fields as analysis dimensions for the data to be analyzed. Taking the data to be analyzed in Table 1 as an example, among the five fields shown in Table 1, there are three dimension fields, "Department", "Development Team", and "Test Team", and two measurement fields, "Revenue" and "Cost". Among the three dimension fields, if Table 1 is analyzed from the "Department" dimension, "Department" is used as the target field, and "Department" is selected from the dimension field as the analysis dimension. If Table 1 is analyzed from the "Department" and "Development Team" dimensions, "Department" and "Development Team" are used as the target fields, and "Department" and "Development Team" are selected from the dimension field as the analysis dimensions.
[0061] In one embodiment, the target field refers to the field involved in the analysis, and the dimension field that does not belong to the target field does not participate in the analysis, but not all target dimensions are used in every analysis. According to the analysis purpose of each analysis, the analysis dimension enabled each time can be determined from the target field, and the dimension combination can be determined according to the enabled analysis dimension. For example, taking the dimension field shown in Table 1 as an example, the three dimension fields of department, development team and test team can be used as the target field, and the analysis dimension includes the "department" dimension, the "development team" dimension and the "test team" dimension, which means that these five field dimensions are all involved in the analysis. In the specific analysis, when analyzing the data (income and cost) of each department, the "department" analysis dimension is enabled; when analyzing the data (income and cost) of different development teams in the department, the dimension combination consisting of the two analysis dimensions of "department" and "development team" is enabled.
[0062] In one embodiment, when the analysis dimension includes more than one, the analysis dimension can be combined to form a dimension combination. For example, the enabled state of each analysis dimension can be combined according to the enabled state of each analysis dimension, so as to determine the dimension combination. Among them, the enabled state of the analysis dimension refers to whether the analysis dimension is used in the analysis. If the analysis dimension is used in a certain analysis, the enabled state of the analysis dimension in the analysis is enabled; if the analysis dimension is not used in a certain analysis, the enabled state of the analysis dimension in the analysis is not enabled. Taking the above example, the analysis dimension includes the "affiliated department" dimension, the "development team" dimension and the "test team" dimension. When analyzing the data (income and cost) of different development teams in the department, the dimension combination composed of the two analysis dimensions of "affiliated department" and "development team" is enabled, then the enabled states of the "affiliated department" dimension and the "development team" dimension are enabled, and the enabled state of the "test team" dimension is not enabled.
[0063] To further ensure the comprehensiveness of the analysis, all possible combinations of analysis dimensions can be exhausted to analyze the analysis data. When combining the enabled status of each analysis dimension to determine the dimension combination, all possible dimension combinations are determined based on all possible combinations of the enabled status of each analysis dimension. Taking n analysis dimensions as an example, the enabled status of each analysis dimension can be divided into enabled and not enabled. Then the enabled status of n analysis dimensions can determine a total of 2 n Dimension combination.
[0064] Taking Table 1 as an example, the analysis dimensions include the "department", "development team" and "test team" dimensions. There are 8 possible combinations of the enabled states of the analysis dimensions, and eight dimension combinations are determined accordingly:
[0065] Dimension combination 1: The "Department" dimension is not enabled, the "Development Team" dimension is not enabled, and the "Test Team" dimension is not enabled;
[0066] Dimension combination 2: The "Department" dimension is not enabled, the "Development Team" dimension is not enabled, and the "Test Team" dimension is enabled;
[0067] Dimension combination 3: The "Department" dimension is not enabled, the "Development Team" dimension is enabled, and the "Test Team" dimension is not enabled;
[0068] Dimension combination 4: The "Department" dimension is not enabled, the "Development Team" dimension is enabled, and the "Test Team" dimension is enabled;
[0069] Dimension combination 5: The "Department" dimension is enabled, the "Development Team" dimension is not enabled, and the "Test Team" dimension is not enabled;
[0070] Dimension combination 6: The "Department" dimension is enabled, the "Development Team" dimension is not enabled, and the "Test Team" dimension is enabled;
[0071] Dimension combination 7: The "Department" dimension is enabled, the "Development Team" dimension is enabled, and the "Test Team" dimension is not enabled;
[0072] Dimension combination 8: The "Department" dimension is enabled, the "Development Team" dimension is enabled, and the "Test Team" dimension is enabled.
[0073] Step S206: analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and status codes of each dimension combination.
[0074] The status code reflects the analysis dimension enabled in the dimension combination. The metric fields of the data to be analyzed are analyzed based on the analysis dimensions enabled in each dimension combination, and the analysis results obtained are the derived data of the data to be analyzed. The methods for analyzing the metric fields of the data to be analyzed include but are not limited to summing, difference, average, or other unlisted analysis methods. After the original data to be analyzed is analyzed, new data, i.e., derived data, can be derived. According to the dimension combination used in the analysis, the derived data obtained by the analysis can correspond to the status code of the dimension combination used. Since not enabling any analysis dimension is also a dimension combination, each status code corresponds to the derived data of a dimension combination, or to the data to be analyzed itself.
[0075] If each analysis dimension is represented by a digit, the enabled status of n analysis dimensions in the dimension combination can be represented by a status code containing n digits. The status code reflects the enabled status of each analysis dimension in the dimension combination through digits, and can be converted into a base, such as from decimal to binary, or from binary to decimal.
[0076] Taking binary as an example, 0 and 1 can be used to distinguish the enabled state of the analysis dimension represented by each digit of the status code. If 1 is used to indicate that the corresponding analysis dimension is enabled, and 0 is used to indicate that the corresponding analysis dimension is not enabled. 3 The status codes of the eight-dimensional combination can be expressed as 111, 110, 101, 100, 011, 010, 001, 000, which are 7, 6, 5, 4, 3, 2, 1, 0 after conversion to decimal. In this way, the status code can correspond to the data to be analyzed or the derived data of the data to be analyzed.
[0077] In one embodiment, the step of analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination, obtaining the derived data of the data to be analyzed and the status code of each dimension combination can be implemented through an SQL statement. With the help of the GROUP BY...WITH CUBE syntax, all possible dimension combinations can be determined according to the analysis dimensions, and based on the analysis dimensions enabled in each dimension combination, the metric fields of the data to be analyzed are analyzed in combination with the analysis functions (such as SUM, AVERAGE, etc.) included in the SQL statement to obtain the derived data of the data to be analyzed. After using the GROUP BY...WITHCUBE syntax, the grouping__id field of each dimension combination is automatically generated. The grouping__id field is in digital form, and the status code of each dimension combination can be obtained based on the grouping__id field. An example of an SQL statement is as follows:
[0078] SELECT grouping__id AS grouping_id
[0079] ,SUM(income) AS income
[0080] ,SUM(cost) AS cost
[0081] ,nvl(dept,"_NULL")AS dept
[0082] ,nvl(dev,"_NULL")AS dev
[0083] ,nvl(test,"_NULL")AS test
[0084] FROM temp.temp_metrics_analysis_sample_acc
[0085] GROUP BY dept,dev,testWITH CUBE.
[0086] The analysis dimensions in the GROUP BY…WITH CUBE syntax can correspond to each bit of the status code in order. Among them, the three analysis dimensions correspond to the three-bit binary status code, and the test dimension corresponds to the unit digit of the binary status code, that is, 2 1 The dev dimension corresponds to the bit immediately to the left of the ones bit in the binary status code, that is, 2 2 The dept dimension corresponds to the leftmost bit of the binary status code, i.e. 2 3 Bit.
[0087] According to the SQL statement, the derived data obtained under each dimension combination of the data to be analyzed shown in Table 1 and the corresponding relationship between the data to be analyzed or the derived data and the status code are shown in Table 2.
[0088] Table 2
[0089]
[0090]
[0091] In Table 2, _NULL indicates that the analysis dimension is enabled. When the analysis dimension is enabled, the analysis dimension itself is not included in the analysis scope. The analysis methods of the three dimensions of "Department", "Development Team" and "Test Team" are all sum statistics. The data to be analyzed or derived data combined with one dimension is a group of data. The binary status code corresponding to each group is shown in the status code column, and the corresponding decimal status code is in brackets.
[0092] Step S208: establishing a cascade relationship between dimension combinations according to the status codes of the dimension combinations.
[0093] After obtaining the status code, the cascade relationship between dimension combinations can be established based on the status code. Since each dimension combination corresponds to a set of data to be analyzed or derived data of the data to be analyzed, each set of data to be analyzed or derived data of the data to be analyzed has a unique corresponding status code. Therefore, the status code can be used as a representative of its huge data. According to the status code of the dimension combination, the cascade relationship between the status codes can be established, and then the cascade relationship between the status codes can be used as the cascade relationship between the dimension combinations.
[0094] The cascade relationship refers to the mapping relationship between multiple objects, especially when processing the data to be analyzed in the database. The cascade relationship mechanism can simplify the complexity of data management and improve management efficiency.
[0095] In one embodiment, when establishing a cascade relationship between dimension combinations according to the status code of the dimension combination, the cascade level of each dimension combination can be determined according to the number of analysis dimensions enabled in the dimension combination, and the cascade relationship between dimension combinations of adjacent cascade levels can be established according to the status codes of dimension combinations of adjacent cascade levels. The cascade relationship between dimension combinations of adjacent cascade levels is established step by step until there are no more scattered dimension combinations, wherein scattered dimension combinations refer to dimension combinations that do not exist or have no cascade relationship established with any dimension combination.
[0096] For example, the cascade level may include level 0 to level n, where n is the number of analysis dimensions. For example, n=3, and the analysis dimensions include the above-mentioned dept dimension, dev dimension, and test dimension. Figure 3 , Figure 3 A schematic diagram of the cascading relationship between dimension combinations. Figure 3 There are 2 of the 3 analysis dimensions shown. 2 = 4 cascading levels, where different cascading levels are separated by dotted lines. n_dim is the number of analysis dimensions enabled in the dimension combination, and reverse_grouping_id indicates the status code. Figure 3 The square box in represents a dimension combination, which shows the analysis dimensions enabled by each dimension combination and the binary status code of each dimension combination. The decimal representation of the status code is in brackets.
[0097] When n_dim=0, it means that no analysis dimension is enabled in the dimension combination, and the data corresponding to the dimension combination is the data to be analyzed, which can be regarded as aggregated data on all dimensions. The cascade level of the dimension combination is determined to be level 0 according to the number of analysis dimensions enabled in the dimension combination.
[0098] When n_dim=1, it means that the dimension combination has enabled one analysis dimension (one of dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under one analysis dimension. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 1.
[0099] When n_dim=2, it means that the dimension combination has enabled two analysis dimensions (two of dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under the two analysis dimensions. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 2.
[0100] When n_dim=3, it means that the dimension combination has enabled three analysis dimensions (dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under the three analysis dimensions. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 3.
[0101] When establishing a cascading relationship between dimension combinations of adjacent cascading levels according to the status codes of dimension combinations of adjacent cascading levels, determine a next-level dimension combination associated with at least two dimension combinations of the same level according to the result of an OR operation of the status codes of at least two dimension combinations of the same level; and establish a cascading relationship between at least two dimension combinations of the same level and the next-level dimension combination.
[0102] The logic of the OR operation is that as long as any one of the inputs is 1, the output is 1; only when all the inputs are 0, the output is 0.
[0103] by Figure 3 For example, different dimension combinations are distinguished by dimension combination (status code), and the cascade level of dimension combination (100) and dimension combination (010) with n_dim=1 are both level 1, which are dimension combinations of the same level, and the cascade level of dimension combination (110) is level 2. If the result of the operation of status code 100 and status code 010 is 110, the cascade relationship between dimension combination (100) and dimension combination (010) and dimension combination (110) can be established. The result of the OR operation of status code 100, status code 010 and status code 001 is 111, but the cascade level of dimension combination (111) is the third level, which is not an adjacent cascade level to the dimension combination of the first level. Therefore, the cascade relationship among dimension combination (100), dimension combination (010), dimension combination (001) and dimension combination (111) is not established. Instead, the cascade relationship among dimension combination (1010), dimension combination (011), dimension combination (101) and dimension combination (111) with a cascade level of the second level is established.
[0104] By establishing cascading relationships between dimension combinations of adjacent cascading levels, it is helpful to dive down level by level when analyzing data without missing any associations or cross-level associations, thus ensuring the stability and order of the cascading relationship.
[0105] The above data processing method obtains the data to be analyzed, which includes dimension fields and metric fields; selects the target field from the dimension field as the analysis dimension, combines the enabled status of each analysis dimension, and determines the dimension combination; analyzes the metric field of the data to be analyzed based on the enabled analysis dimensions in each dimension combination, obtains the derived data of the data to be analyzed and the status code of each dimension combination, and the status code reflects the enabled analysis dimension in the dimension combination; establishes a cascade relationship between dimension combinations based on the status code of the dimension combination. In this way, different dimension combinations can be exhaustively enumerated according to the combination of different enabling methods of the analysis dimensions, and the enabled status of each analysis dimension in the dimension combination can be identified by the status code, and the cascade relationship between the dimension combinations can be established based on the status code. When data analysis is to be performed, the upper and lower dimension combinations can be determined according to the analyzed dimension combination combined with the cascade relationship, thereby improving the efficiency of data analysis.
[0106] In one embodiment, the data to be analyzed includes m dimension fields, a target field is selected from the dimension fields as an analysis dimension, and the enabled states of the analysis dimensions are combined to determine that the dimension combination includes:
[0107] Select n target fields from m dimension fields as n analysis dimensions, combine the enabled states of the n analysis dimensions, and determine 2 n dimensional combinations, where m and n are positive integers and m ≥ n.
[0108] When selecting a target field from a dimension field as an analysis dimension, for m dimension fields contained in the data to be analyzed, n dimension fields can be selected from them as target fields to obtain n analysis dimensions. Where n is an integer not greater than m, and n can be equal to m or less than m. When n is equal to m, all dimension fields in the data to be analyzed are used as target fields to determine m analysis dimensions. When n is less than m, some of the dimension fields in the data to be analyzed are selected as target fields to determine n analysis dimensions. For example, m can be 5 and n can be 3.
[0109] In one embodiment, establishing a cascade relationship between dimension combinations according to the status code of the dimension combination includes:
[0110] For each dimension combination, the cascade level of the dimension combination is determined according to the number of analysis dimensions enabled in the dimension combination, where the cascade level includes level 0 to level n; and the cascade relationship between dimension combinations of adjacent cascade levels is established according to the status codes of dimension combinations of adjacent cascade levels.
[0111] For example, the cascade level may include level 0 to level n, where n is the number of analysis dimensions. For example, n=3, and the analysis dimensions include the above-mentioned dept dimension, dev dimension, and test dimension. Figure 3 , Figure 3 A schematic diagram of the cascading relationship between dimension combinations. Figure 3 There are 2 of the 3 analysis dimensions shown. 2 = 4 cascade levels, where different cascade levels are separated by dashed lines. n_dim is the number of analysis dimensions enabled in the dimension combination. Figure 3 The square box in represents a dimension combination, which shows the analysis dimensions enabled by each dimension combination and the binary status code of each dimension combination. The decimal representation of the status code is in brackets.
[0112] When n_dim=0, it means that no analysis dimension is enabled in the dimension combination, and the data corresponding to the dimension combination is the data to be analyzed, which can be regarded as aggregated data on all dimensions. The cascade level of the dimension combination is determined to be level 0 according to the number of analysis dimensions enabled in the dimension combination.
[0113] When n_dim=1, it means that the dimension combination has enabled one analysis dimension (one of dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under one analysis dimension. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 1.
[0114] When n_dim=2, it means that the dimension combination has enabled two analysis dimensions (two of dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under the two analysis dimensions. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 2.
[0115] When n_dim=3, it means that the dimension combination has enabled three analysis dimensions (dept, dev, and test), and the data corresponding to the dimension combination is the derived data of the data to be analyzed under the three analysis dimensions. According to the number of analysis dimensions enabled in the dimension combination, the cascade level of the dimension combination is determined to be level 3.
[0116] In one embodiment, establishing a cascading relationship between dimension combinations at adjacent cascading levels according to status codes of dimension combinations at adjacent cascading levels includes:
[0117] According to the OR operation result of the status codes of at least two dimension combinations of the same level, a next-level dimension combination associated with the at least two dimension combinations of the same level is determined; and a cascade relationship between the at least two dimension combinations of the same level and the next-level dimension combination is established.
[0118] The logic of the OR operation is that as long as any one of the inputs is 1, the output is 1; only when all the inputs are 0, the output is 0.
[0119] by Figure 3 For example, different dimension combinations are distinguished by dimension combination (status code), and the cascade level of dimension combination (100) and dimension combination (010) with n_dim=1 are both level 1, which are dimension combinations of the same level, and the cascade level of dimension combination (110) is level 2. The result of the OR operation of status code 100 and status code 010 is 110, so the cascade relationship between dimension combination (100) and dimension combination (010) and dimension combination (110) can be established. The result of the OR operation of status code 100, status code 010 and status code 001 is 111, but the cascade level of dimension combination (111) is the third level, which is not an adjacent cascade level to the dimension combination of the first level. Therefore, the cascade relationship among dimension combination (100), dimension combination (010), dimension combination (001) and dimension combination (111) is not established. Instead, the cascade relationship among dimension combination (1010), dimension combination (011), dimension combination (101) and dimension combination (111) with a cascade level of the second level is established.
[0120] In the above embodiment, by establishing a cascade relationship between dimension combinations of adjacent cascade levels, it is beneficial to dive down level by level when analyzing data without missing any association or cross-level association, thereby ensuring the stability and order of the cascade relationship.
[0121] In one embodiment, the metric fields of the data to be analyzed are analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed and the status code of each dimension combination, including:
[0122] The metric fields of the data to be analyzed are analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed and the grouping identifiers of each dimension combination, wherein each dimension combination corresponds to the data to be analyzed or a group of derived data; the grouping identifiers of the dimension combination are reversed in sequence to obtain the status code of the dimension combination.
[0123] In one embodiment, when analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed, the status code of each dimension combination is not directly generated, but the grouping identifier of each dimension combination is first obtained, and then the status code of each dimension combination is obtained according to the grouping identifier of each dimension combination.
[0124] Optionally, when obtaining the grouping identifier of each dimension combination, the n analysis dimensions can be converted into numerical values on corresponding bits of the n-bit binary code according to the dimension order and activation status of the n analysis dimensions in the dimension combination to obtain the n-bit binary code, and the grouping identifier of the dimension combination can be obtained according to the n-bit binary code.
[0125] Among them, if the analysis dimension is enabled in the dimension combination, the value of the corresponding bit of the n-bit binary code is set to 0; if the analysis dimension is not enabled in the dimension combination, the value of the corresponding bit of the n-bit binary code is set to 1.
[0126] For example, when using an SQL statement containing the GROUP BY...WITH CUBE syntax to analyze the metric fields of the data to be analyzed, after obtaining the derived data of the data to be analyzed, the grouping__id field of each dimension combination is automatically generated. The grouping__id field is the grouping identifier of each dimension combination automatically generated by the GROUP BY...WITH CUBE syntax. Each group of data to be analyzed or the derived data of the data to be analyzed has a unique corresponding grouping identifier. The derived data obtained under each dimension combination of the data to be analyzed shown in Table 1 and the corresponding relationship between the data to be analyzed or the derived data and the grouping identifier are shown in Table 3.
[0127] Table 3
[0128]
[0129]
[0130] In the embodiment of the present application, the dimension combination corresponding to the status code 000 is used as the root node of the cascade relationship, and the dimension combination corresponding to each status code is associated with the root node step by step. The number of analysis dimensions enabled in the status code is exactly equal to the cascade relationship of the corresponding dimension combination. Taking 000 as the root node, it is convenient to establish a cascade relationship step by step.
[0131] In some cases, the number of analysis dimensions enabled by the dimension combination corresponding to the n-bit grouping identifier where each bit is 0 is not 0 but n, and the relationship with the cascade level is inconvenient to determine. This grouping identifier is not convenient to be used as the root node of the cascade relationship. Therefore, after obtaining the grouping identifiers of each dimension combination, the grouping identifiers of the dimension combination are sequence-reversed to obtain the status code of the dimension combination, and the cascade relationship between the dimension combinations is established based on the status code of each dimension combination.
[0132] The sequence of the grouping identifier of the dimension combination is reversed to obtain the status code of the dimension combination, which includes: if the grouping identifier and the status code are decimal codes, the total number of dimension combinations is determined, the total number of dimension combinations is subtracted from the grouping identifier, and 1 is subtracted to obtain the status code; if the grouping identifier and the status code are binary codes, all 0s on the grouping identifier are set to 1s, and all 1s on the grouping identifier are set to 0s to obtain the status code. After obtaining the status code of each dimension combination, a cascade relationship between the dimension combinations can be established based on the status code of each dimension combination.
[0133] In one embodiment, after establishing the cascade relationship between the dimension combinations according to the status codes of the dimension combinations, the method further includes:
[0134] When there is an anomaly in the derived data of the i-th level dimension combination, the i-th level dimension combination is determined as the i-th level abnormal dimension combination; according to the cascading relationship, drill down from the i-th level abnormal dimension combination, and determine the associated next-level abnormal dimension combination level by level until drilling down to the last level abnormal dimension combination; the last level abnormal dimension combination is determined as the target dimension combination of the data anomaly.
[0135] After establishing the cascade relationship between dimension combinations, when data anomalies occur, the analysis dimension where the anomaly occurs can be located based on the established cascade relationship. In the i-th level abnormal dimension combination, i analysis dimensions are enabled. When the derived data of the i-th level abnormal dimension combination is abnormal, it means that the derived data obtained by analyzing the i analysis dimensions is abnormal.
[0136] Among them, for the derived data obtained by analysis, when there is an abnormality in the derived data of the i-th level dimension combination, the dimension combination corresponding to the abnormal derived data can be determined as the i-th level abnormal dimension combination, and according to the cascade relationship, the upper and lower level dimension combinations of the i-th level abnormal dimension combination can be determined. The upper and lower level dimension combinations of the i-th level abnormal dimension combination refer to the i-1-th level abnormal dimension combination and the i+1-th level abnormal dimension combination that have a cascade relationship with the i-th level abnormal dimension combination.
[0137] When the derived data of the i-th level abnormal dimension combination is abnormal, it will inevitably affect the derived data of the i+1-th level abnormal dimension combination in a cascade relationship with it, which may affect the derived data of the i-1-th level abnormal dimension combination in a cascade relationship with it. In order to locate the specific data where the abnormality occurs, you can drill down from the i-th level abnormal dimension combination according to the cascade relationship, and determine the associated next level abnormal dimension combination step by step until you drill down to the last level abnormal dimension combination; the last level abnormal dimension combination is determined as the target dimension combination of data abnormality.
[0138] In the above embodiment, combined with the cascade relationship established between dimension combinations, when data anomalies occur, the upstream and downstream dimension combinations of the abnormal dimension combination can be located, so that automatic drill-down analysis of the data can be achieved according to the cascade relationship to quickly find the root cause of the data anomaly.
[0139] This application also provides a specific embodiment, please refer to Figure 4 The specific implementation of the data processing method in this application scenario is as follows:
[0140] S1. Obtain the data to be analyzed.
[0141] The data to be analyzed includes dimension fields and measure fields.
[0142] S2. Select n target fields from the m dimension fields as n analysis dimensions, combine the enabled states of the n analysis dimensions, and determine 2 n Dimension combination.
[0143] Wherein, m and n are positive integers and m≥n.
[0144] S3. Analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed.
[0145] Each dimension combination corresponds to the data to be analyzed or a set of derived data.
[0146] S4. According to the dimension order and the enabled status of the n analysis dimensions in the dimension combination, the n analysis dimensions are converted into numerical values at corresponding bits of the n-bit binary code to obtain the n-bit binary code.
[0147] Among them, if the analysis dimension is enabled in the dimension combination, the value of the corresponding bit of the n-bit binary code is set to 0; if the analysis dimension is not enabled in the dimension combination, the value of the corresponding bit of the n-bit binary code is set to 1.
[0148] S5. Obtain a grouping identifier of the dimension combination according to the n-bit binary code.
[0149] S6. If the grouping identifier and the status code are decimal codes, determine the total number of dimension combinations, subtract the grouping identifier from the total number of dimension combinations, and subtract 1 to obtain the status code.
[0150] S7. If the group identifier and the status code are binary coded, set all 0s in the group identifier to 1s, and set all 1s in the group identifier to 0s to obtain the status code.
[0151] S8. For each dimension combination, determine the cascading level of the dimension combination according to the number of analysis dimensions enabled in the dimension combination.
[0152] The cascade levels include level 0 to level n.
[0153] S9. Determine a next-level dimension combination associated with at least two same-level dimension combinations according to an OR operation result of the status codes of at least two same-level dimension combinations.
[0154] S10. Establish a cascade relationship between at least two same-level dimension combinations and a next-level dimension combination.
[0155] S11. When there is an anomaly in the derived data of the i-th level dimension combination, the i-th level dimension combination is determined as the i-th level abnormal dimension combination.
[0156] S12. Drill down from the i-th level abnormal dimension combination according to the cascade relationship, and determine the associated next-level abnormal dimension combination level by level until drilling down to the last level abnormal dimension combination.
[0157] S13. Determine the last level of abnormal dimension combination as the target dimension combination of data anomaly.
[0158] In the above embodiment, the data to be analyzed is obtained, and the data to be analyzed includes dimension fields and metric fields; the target field is selected from the dimension fields as the analysis dimension, and the activation status of each analysis dimension is combined to determine the dimension combination; the metric field of the data to be analyzed is analyzed based on the analysis dimensions enabled in each dimension combination, and the derived data of the data to be analyzed and the status code of each dimension combination are obtained, and the status code reflects the analysis dimension enabled in the dimension combination; according to the status code of the dimension combination, a cascade relationship between the dimension combinations is established. In this way, different dimension combinations can be exhaustively enumerated according to the combination of different activation modes of the analysis dimensions, and the activation status of each analysis dimension in the dimension combination can be identified by the status code, and the cascade relationship between the dimension combinations can be established based on the status code. When a data anomaly occurs in a certain combination dimension, the upper and lower dimension combinations corresponding to the abnormal combination dimension can be determined according to the cascade relationship, and the deepest dimension combination of the data anomaly can be located from the abnormal combination dimension step by step, and then the dimension where the anomaly occurs can be determined.
[0159] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0160] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0161] In an exemplary embodiment, Figure 5 As shown, a data processing device is provided, including: an acquisition module 701, a combination module 702, an analysis module 703 and a cascade module 704, wherein:
[0162] The acquisition module 701 is used to acquire the data to be analyzed, where the data to be analyzed includes dimension fields and metric fields;
[0163] A combination module 702 is used to select a target field from the dimension fields as an analysis dimension, combine the enabled states of the analysis dimensions, and determine a dimension combination;
[0164] An analysis module 703 is used to analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination, and obtain the derived data of the data to be analyzed and the status code of each dimension combination, where the status code reflects the analysis dimensions enabled in the dimension combination;
[0165] The analysis module 704 is used to establish a cascade relationship between dimension combinations according to the status codes of the dimension combinations.
[0166] In one embodiment, the data to be analyzed includes m dimension fields. When selecting a target field from the dimension fields as an analysis dimension and combining the enabled states of the analysis dimensions to determine a dimension combination, the combination module 702 is further used to:
[0167] Select n target fields from m dimension fields as n analysis dimensions, combine the enabled states of the n analysis dimensions, and determine 2 n dimensional combinations, where m and n are positive integers and m ≥ n.
[0168] In one embodiment, when establishing a cascade relationship between dimension combinations according to the status codes of the dimension combinations, the cascade module 704 is further configured to:
[0169] For each dimension combination, determining the cascade level of the dimension combination according to the number of analysis dimensions enabled in the dimension combination, wherein the cascade level includes level 0 to level n;
[0170] According to the status codes of the dimension combinations at adjacent cascade levels, a cascade relationship between the dimension combinations at adjacent cascade levels is established.
[0171] In one embodiment, when establishing a cascading relationship between dimension combinations at adjacent cascading levels according to the status codes of the dimension combinations at adjacent cascading levels, the cascading module 704 is further configured to:
[0172] Determine, according to an OR operation result of the status codes of at least two dimension combinations of the same level, a next-level dimension combination associated with the at least two dimension combinations of the same level;
[0173] Establish a cascading relationship between at least two same-level dimension combinations and a next-level dimension combination.
[0174] In one embodiment, when analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed and the status code of each dimension combination, the analysis module 703 is further used to:
[0175] Analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed and the grouping identifier of each dimension combination, wherein each dimension combination corresponds to the data to be analyzed or a group of derived data;
[0176] The grouping identifiers of the dimension combination are reversed in sequence to obtain the status code of the dimension combination.
[0177] In one embodiment, when obtaining the grouping identifiers of the dimensional combinations, the analysis module 703 is further used to:
[0178] According to the dimension order and activation status of the n analysis dimensions in the dimension combination, the n analysis dimensions are converted into the numerical values at the corresponding bits of the n-bit binary code to obtain the n-bit binary code, wherein if the analysis dimension is enabled in the dimension combination, the numerical value at the corresponding bit of the n-bit binary code is set to 0; if the analysis dimension is not enabled in the dimension combination, the numerical value at the corresponding bit of the n-bit binary code is set to 1;
[0179] The grouping identifier of the dimension combination is obtained according to the n-bit binary code.
[0180] In one embodiment, when the grouping identifiers of the dimension combination are reversed in sequence to obtain the status code of the dimension combination, the analysis module 703 is further used to:
[0181] If the grouping identifier and the status code are decimal codes, determine the total number of dimension combinations, subtract the grouping identifier from the total number of dimension combinations, and subtract 1 to obtain the status code;
[0182] If the group identifier and status code are binary coded, set all 0 bits in the group identifier to 1, and set all 1 bits in the group identifier to 0 to obtain the status code.
[0183] In one embodiment, see Figure 6 The data processing device further includes a positioning module 705. After establishing a cascade relationship between dimension combinations according to the status code of the dimension combination, the positioning module 705 is used to:
[0184] When the derived data of the i-th level dimension combination is abnormal, the i-th level dimension combination is determined as the i-th level abnormal dimension combination;
[0185] According to the cascading relationship, drill down from the i-th level abnormal dimension combination, and determine the associated next-level abnormal dimension combination level by level until drilling down to the last level abnormal dimension combination;
[0186] The last level of abnormal dimension combination is determined as the target dimension combination of data anomaly.
[0187] In the above data processing device, the acquisition module 701 acquires the data to be analyzed, and the data to be analyzed includes dimension fields and metric fields; the combination module 702 selects the target field from the dimension field as the analysis dimension, combines the activation status of each analysis dimension, and determines the dimension combination; the analysis module 703 analyzes the metric field of the data to be analyzed based on the analysis dimensions enabled in each dimension combination, obtains the derived data of the data to be analyzed and the status code of each dimension combination, and the status code reflects the analysis dimension enabled in the dimension combination; the cascade module 704 establishes the cascade relationship between the dimension combinations according to the status code of the dimension combination. In this way, different dimension combinations can be exhaustively enumerated according to the combination of different activation modes of the analysis dimensions, and the activation status of each analysis dimension in the dimension combination can be identified by the status code, and the cascade relationship between the dimension combinations can be established based on the status code. When data analysis is to be performed, the upper and lower dimension combinations can be determined according to the analyzed dimension combination combined with the cascade relationship, thereby improving the data analysis efficiency.
[0188] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0189] Terms such as "component", "module", and "system" are intended to refer to a computer-related entity, which can be hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable code, a thread of execution, a program, and / or a computer. As an illustration, both a running program running on a server and a server can be a component. One or more components can reside in a process and / or a thread of execution, and a component can be located in one computer and / or distributed between two or more computers.
[0190] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile computer-readable storage medium and an internal memory. The non-volatile computer-readable storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile computer-readable storage medium. The database of the computer device is used to store dimension combinations, status codes of dimension combinations, cascade relationships between dimension combinations, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer-readable instructions are executed by the processor to implement a data processing method.
[0191] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile computer-readable storage medium and an internal memory. The non-volatile computer-readable storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile computer-readable storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. The computer-readable instructions are executed by the processor to implement a data processing method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0192] Those skilled in the art will understand that Figure 7 , 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0193] In one embodiment, a computer device is further provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps in the above-mentioned method embodiments when executing the computer-readable instructions.
[0194] In one embodiment, a computer-readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0195] In one embodiment, a computer program product is provided, the computer program product comprising computer-readable instructions, the computer-readable instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer-readable instructions from the computer-readable storage medium, and the processor executes the computer-readable instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0196] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0197] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0198] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: include: Acquire data to be analyzed, where the data to be analyzed includes dimension fields and metric fields; Selecting a target field from the dimension fields as an analysis dimension, combining the enabled states of the analysis dimensions, and determining a dimension combination; Analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination; According to the status code of the dimension combination, a cascade relationship between dimension combinations is established.
2. The method according to claim 1, characterized in that The data to be analyzed includes m dimension fields, and the target field is selected from the dimension fields as the analysis dimension, and the activation status of each analysis dimension is combined to determine the dimension combination, including: Select n target fields from the m dimension fields as n analysis dimensions, combine the enabled states of the n analysis dimensions, and determine 2 n dimensional combinations, where m and n are positive integers and m ≥ n.
3. The method according to claim 1, characterized in that The establishing of the cascade relationship between the dimension combinations according to the status code of the dimension combination includes: For each dimension combination, determining the cascade level of the dimension combination according to the number of analysis dimensions enabled in the dimension combination, wherein the cascade level includes level 0 to level n; According to the status codes of the dimension combinations at adjacent cascade levels, a cascade relationship between the dimension combinations at adjacent cascade levels is established.
4. The method according to claim 3, characterized in that The step of establishing a cascading relationship between dimension combinations at adjacent cascading levels according to the status codes of the dimension combinations at adjacent cascading levels includes: Determine, according to an OR operation result of status codes of at least two dimension combinations of the same level, a next-level dimension combination associated with the at least two dimension combinations of the same level; A cascade relationship is established between the at least two same-level dimension combinations and the next-level dimension combination.
5. The method according to claim 1, characterized in that The step of analyzing the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain the derived data of the data to be analyzed and the status code of each dimension combination includes: Analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination to obtain derived data of the data to be analyzed and group identifiers of each dimension combination, wherein each dimension combination is for the data to be analyzed or for a group of the derived data; The grouping identifiers of the dimension combination are reversed in sequence to obtain the status code of the dimension combination.
6. The method according to claim 5, characterized in that The grouping identifiers of the dimensional combinations are obtained as follows: According to the dimension order and activation status of the n analysis dimensions in the dimension combination, the n analysis dimensions are converted into numerical values at corresponding bits of the n-bit binary code to obtain the n-bit binary code, wherein if the analysis dimension is enabled in the dimension combination, the numerical value at the corresponding bit of the n-bit binary code is set to 0, and if the analysis dimension is not enabled in the dimension combination, the numerical value at the corresponding bit of the n-bit binary code is set to 1; A grouping identifier of the dimension combination is obtained according to the n-bit binary code.
7. The method according to claim 5, characterized in that The state code of the dimension combination obtained by performing sequence reversal on the grouping identifiers of the dimension combination includes: If the grouping identifier and the status code are decimal codes, determining the total number of the dimension combinations, subtracting the grouping identifier from the total number of the dimension combinations, and subtracting 1 to obtain the status code; If the group identifier and the status code are binary coded, all 0s in the group identifier are set to 1s, and all 1s in the group identifier are set to 0s to obtain the status code.
8. The method according to any one of claims 1 to 7, characterized in that: After establishing the cascade relationship between the dimension combinations according to the status codes of the dimension combinations, the method further includes: When there is an abnormality in the derived data of the i-th level dimension combination, the i-th level dimension combination is determined as the i-th level abnormal dimension combination; According to the cascade relationship, drill down from the i-th level abnormal dimension combination, and determine the associated next level abnormal dimension combination level by level until drilling down to the last level abnormal dimension combination; The last level abnormal dimension combination is determined as the target dimension combination of data anomaly.
9. A data processing device, characterized in that: include: An acquisition module is used to acquire data to be analyzed, wherein the data to be analyzed includes dimension fields and metric fields; A combination module, used to select a target field from the dimension fields as an analysis dimension, combine the enabled states of the analysis dimensions, and determine a dimension combination; An analysis module, configured to analyze the metric fields of the data to be analyzed based on the analysis dimensions enabled in each dimension combination, to obtain the derived data of the data to be analyzed and a status code of each dimension combination, wherein the status code reflects the analysis dimensions enabled in the dimension combination; The cascade module is used to establish a cascade relationship between dimension combinations according to the status codes of the dimension combinations.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.