Multi-dimensional data detection method and device, electronic equipment, readable storage medium and chip

By using a depth-first search algorithm to detect computational loops in a multidimensional database, identifying and stopping abnormal loops, and dynamically adjusting the script code, the problem of computational unavailability caused by loops in multidimensional data detection is solved, improving efficiency and reducing costs.

CN120803775APending Publication Date: 2025-10-17YONYOU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510807695.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing multidimensional data detection methods cannot detect loops in the computation chain in a timely manner, resulting in unavailable real-time computation, wasted server resources, and impact on the computational efficiency of multidimensional databases.

Method used

The computation chain is traversed using a depth-first search algorithm to identify abnormal loop paths, and their computation is terminated. Loop information and script code blocks are returned, and the script code is dynamically adjusted to repair the abnormal loops.

Benefits of technology

It improves the real-time computing efficiency of multidimensional databases, reduces server resource waste, shortens troubleshooting time, and lowers operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803775A_ABST
    Figure CN120803775A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-dimensional data detection method and device, electronic equipment, a readable storage medium and a chip, and the method comprises the steps: determining a plurality of data items in a multi-dimensional real-time calculation process; determining calculation links of the target data item corresponding to the plurality of data source items; determining a directed graph according to the plurality of calculation links, wherein the directed graph comprises a plurality of unidirectional paths; traversing the one-way path through a depth-first algorithm, and determining a traversing parameter of each data item; determining secondary access data items according to the traversal parameters; determining a one-way path taking the secondary access data item as a starting point as an abnormal loop path; and stopping calculation of the abnormal loop path, and determining a plurality of script code blocks corresponding to the abnormal loop path. By means of the scheme, waste of server computing resources is reduced, and the real-time computing efficiency of the enterprise multi-dimensional database is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of multi-dimensional data processing, in particular to a multi-dimensional data detection method and device, electronic equipment, readable storage medium and chip. BACKGROUND

[0002] With the wide application of multi-dimensional databases, in the enterprise real-time computing process, not only data calculation needs to be realized, but also data change factors need to be dynamically analyzed and business rules need to be changed in real time, so that the enterprise can adapt to the changing market situation. However, the current multi-dimensional data detection or tracking method cannot detect the loop in the calculation link in time when the business rule is changed or the code is written incorrectly, resulting in that the real-time calculation of the loop corresponding to the business is unavailable, the computing resources of the server are wasted invalidly, and the real-time calculation efficiency of the multi-dimensional database is affected. SUMMARY

[0003] The embodiments of the present application provide a multi-dimensional data detection method, device, electronic equipment, readable storage medium and chip, which can solve the problem that the loop in the calculation link cannot be detected in time when the business rule is changed or the code is written incorrectly, resulting in that the real-time calculation of the loop corresponding to the business is unavailable, and the computing resources of the server are wasted invalidly.

[0004] Therefore, the embodiments of the first aspect of the present application provide a multi-dimensional data detection method.

[0005] The embodiments of the second aspect of the present application provide a multi-dimensional data detection device.

[0006] The embodiments of the third aspect of the present application provide an electronic equipment.

[0007] The embodiments of the fourth aspect of the present application provide a readable storage medium.

[0008] The embodiments of the fifth aspect of the present application provide a chip.

[0009] In order to achieve the above-mentioned purpose, the embodiments of the first aspect of the present application provide a multi-dimensional data detection method, comprising: determining a plurality of data items in a multi-dimensional real-time computing process, the data items comprising data source items and target data items; determining a calculation link corresponding to the target data items and the plurality of data source items, the calculation link corresponding to a script code block bound; determining a directed graph according to the plurality of calculation links, the directed graph comprising a plurality of one-way paths, and the end points of the one-way paths being the data items; traversing the one-way paths by a depth-first algorithm to determine a traversal parameter of each data item; determining a second access data item according to the traversal parameter; determining a one-way path taking the second access data item as a starting point as an abnormal loop path; aborting the calculation of the abnormal loop path, and determining a plurality of script code blocks corresponding to the abnormal loop path.

[0010] The multi-dimensional data detection method provided by the application can detect and track data in real time during the calculation link of the real-time calculation of the multi-dimensional database, determine abnormal loop paths caused by changes in business rules in the calculation link during the real-time calculation, and the abnormal loop paths are caused by mutual references between the single-direction paths corresponding to the calculation link. When the abnormal loop paths are detected, the calculation of the abnormal loop paths is stopped, the data of the abnormal loop paths is tracked, and the loop information is returned to the user. The returned information includes loop information and a plurality of script code blocks corresponding to the abnormal loop paths, and the script code blocks include multi-dimensional rule script information stored in the stack information of a Java Virtual Machine (JVM), such as script names and script code lines. The script code blocks are adjusted through changes in business rules, so that the calculation link in the multi-dimensional database is modified.

[0011] It can be understood that the loop is dynamically detected during the real-time calculation, and the abnormal path is immediately stopped when the abnormal loop path is detected, so that the infinite recursion caused by the circular dependency is avoided, the waste of server computing resources is reduced, and the real-time calculation efficiency of the enterprise multi-dimensional database is improved.

[0012] In the above technical solution, the directed graph is determined according to the plurality of calculation links, including: determining path information corresponding to the calculation link; determining a reference relationship between a target data item and a data source item according to the path information; determining a starting point and an ending point corresponding to the calculation link according to the reference relationship; determining a single-direction path according to the starting point and the ending point; and determining the directed graph according to the plurality of single-direction paths.

[0013] In this solution, the path information includes a reference relationship between a plurality of data items, and the calculation link includes a mathematical rule in which the target data item corresponds to a plurality of data source items. The starting point and the ending point corresponding to the calculation link are determined by defining the membership relationship of the target data item to the data source item, and the specific mapping path of the target data item to the data source item, i.e., the single-direction path, is determined based on the reference relationship. The starting point of the single-direction path is the target data item, and the ending point of the single-direction path is the data source item.

[0014] The directed graph is determined according to the plurality of single-direction paths, which limits the logical link of the data flow and clearly defines the calculation dependency relationship between the data source item and the target data item, thereby reducing the data processing amount in the multi-dimensional data calculation process. The hierarchical relationship between the plurality of data items is clearly defined by the plurality of single-direction paths, thereby improving the robustness of the multi-dimensional data detection.

[0015] It can be understood that the dependence network between the data items is globally displayed through the directed graph structure, which provides a topological model for loop detection and improves the efficiency of multi-dimensional data detection.

[0016] In any of the above technical solutions, optionally, the determining the calculation link corresponding to the target data item and the plurality of data source items further comprises: obtaining a multi-dimensional script rule; updating the script code block according to the multi-dimensional script rule; and updating the plurality of calculation links according to the updated script code block.

[0017] In the present solution, the multi-dimensional script rule is the updated business rule of the system. When the business rule of the system is updated, the code segment implementing the specific calculation logic in the script code block is modified according to the multi-dimensional script rule. The script code corresponding to the updated business rule is determined, and the updated script code is stored in the stack information of the JVM, ensuring that the calculation logic is synchronized with the business demand in real time.

[0018] In any of the above technical solutions, optionally, the determining the secondary access data item according to the traversal parameter comprises: determining the data item corresponding to each one-way path; determining the traversal record of the data item; determining the traversal parameter corresponding to the data item according to the traversal record; determining the traversal parameter threshold; and determining the data item as the secondary access data item when the traversal parameter of the data item is greater than the traversal parameter threshold.

[0019] In the present solution, the traversal record of each vertex in the directed graph is determined in the Depth-First-Search (DFS) traversal process, i.e., the traversal record of the data item corresponding to each one-way path. The traversal record includes the state information of each vertex in the traversal process, and the state information is used to determine whether the data item in the directed graph is completed. When the data item is completed, the number of times the data item is completed is recorded, i.e., the traversal parameter. The traversal parameter threshold is a preset value, and the value corresponding to the preset value is 1. When the number of times the data item is completed is greater than the traversal parameter threshold, the data item is determined as the secondary access data item.

[0020] It can be understood that the traversal behavior of the DFS algorithm is converted into an analyzable numerical index, the starting point of the abnormal loop path is determined, the secondary access data item causing the loop is quickly located, and the efficiency of multi-dimensional data detection is improved.

[0021] In any of the above technical solutions, optionally, the determining the one-way path taking the secondary access data item as the starting point as the abnormal loop path comprises: determining the data source item associated with the secondary access data item according to the reference relationship; determining a first calculation link between the secondary access data item and at least one data source item; determining a second calculation link according to the first calculation link, the endpoint of the first calculation link being the starting point of the second calculation link; and determining the abnormal loop path according to the first calculation link and the second calculation link.

[0022] In this solution, an abnormal loop path is determined based on the secondary access data item. The abnormal loop path includes multiple unidirectional paths. The multiple unidirectional paths associated with the secondary access data item are determined through reference relationships. Based on the reference relationships, the primary computing link and secondary computing link associated with the secondary access data item are determined. A primary computing link is a unidirectional path directly associated with the secondary access data item, and a secondary computing link is a subpath starting from the endpoint of the primary computing link. The secondary computing link includes multiple unidirectional paths at different levels.

[0023] It can be understood that through the linkage analysis of the primary computing link and the secondary computing link, the one-way paths of direct and indirect data dependencies are identified and accessed secondary, avoiding the limitation of detecting only a single layer of dependency, and determining the integrity of the abnormal loop path, thereby improving the robustness of multi-dimensional data detection.

[0024] In any of the above technical solutions, optionally, after terminating the calculation of the abnormal loop path and determining multiple script code blocks corresponding to the abnormal loop path, it also includes: determining multiple path information corresponding to the abnormal loop path; and determining data tracking information based on the path information and the script code block.

[0025] In this solution, after terminating the calculation of the abnormal loop path, the path information and script code block are returned to the system user as data tracking information. This allows the user to perform complete contextual information detection on the abnormal loop path, providing a data foundation for tracing the abnormal loop problem. Path information includes data types, dimension information, and business tags, while script code blocks include the script file name, script code lines, and script code snippets. By returning the script code block, the script is bound to the calculation logic, and an actionable repair basis is determined. The enterprise operator can then repair the abnormal loop path by modifying the corresponding script code block.

[0026] As you can understand, by integrating path information, the script code is located. Combining the script code and path information to determine data tracking information, the loop information is returned, allowing users to intuitively understand the complete information of the abnormal loop path and the corresponding script code, improving the repair efficiency when abnormal loops are detected during multi-dimensional data calculations, and reducing operation and maintenance costs.

[0027] Embodiments of the second aspect of the application provide a multi-dimensional data detection device, comprising: a link module configured to determine a plurality of data items in a multi-dimensional real-time computing process, the data items comprising data source items and target data items; determine computing links corresponding to the target data items and the plurality of data source items, the computing links being bound with script code blocks; a traversal module configured to determine a directed graph according to the plurality of computing links, the directed graph comprising a plurality of one-way paths, endpoints of the one-way paths being the data items; traverse the one-way paths by a depth-first algorithm to determine traversal parameters of each data item; a loop module configured to determine a second-visited data item according to the traversal parameters; determine a one-way path with the second-visited data item as a starting point as an abnormal loop path; and a tracking module configured to abort computation of the abnormal loop path and determine a plurality of script code blocks corresponding to the abnormal loop path.

[0028] Embodiments of the third aspect of the application provide an electronic device, comprising a processor, a memory, and a program or instructions stored in the memory and executable on the processor, the program or instructions being executed by the processor to implement the steps of the multi-dimensional data detection method of the first aspect.

[0029] Embodiments of the fourth aspect of the application provide a readable storage medium, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement the steps of the multi-dimensional data detection method of the first aspect.

[0030] Embodiments of the fifth aspect of the application provide a chip, the chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a program or instructions to implement the steps of the multi-dimensional data detection method of the first aspect.

[0031] Additional aspects and advantages of the technical solutions of the application will become apparent from the following description part or be appreciated through practice of the application. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 A flowchart of a multi-dimensional data detection method according to an embodiment of the application is shown; Figure 2 A partial flowchart of a multi-dimensional data detection method according to an embodiment of the application is shown; Figure 3 A partial flowchart of a multi-dimensional data detection method according to an embodiment of the application is shown; Figure 4 A partial flowchart of a multi-dimensional data detection method according to an embodiment of the application is shown; Figure 5 A partial flowchart of a multi-dimensional data detection method according to an embodiment of the application is shown; Figure 6Part flow diagram of a multi-dimensional data detection method according to an embodiment of the present application is shown. Figure 7 Structure diagram of a multi-dimensional data detection device according to an embodiment of the present application is shown. Figure 8 Structure diagram of an electronic device according to an embodiment of the present application is shown. Figure 9 Data item association diagram according to an embodiment of the present application is shown. Figure 10 Computing link diagram according to an embodiment of the present application is shown. Figure 11 Data tracking principle diagram according to an embodiment of the present application is shown. Figure 12 Loop diagram according to an embodiment of the present application is shown. Figure 13 Directed graph diagram according to an embodiment of the present application is shown.

[0033] In the above embodiments of the present application, Figure 7 and Figure 8 The correspondence between the reference signs and the component names in the above embodiments of the present application is as follows: 900: multi-dimensional data detection device; 902: link module; 904: traversal module; 906: loop module; 908: tracking module; 1000: electronic device; 1109: memory; 1110: processor. DETAILED DESCRIPTION

[0034] In order to more clearly understand the above-mentioned purposes, features and advantages of the embodiments of the present application, the embodiments of the present application are further described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0035] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, however, embodiments of the present application can also be implemented in other ways different from those described herein, therefore, the scope of protection of the present application is not limited to the specific embodiments disclosed below.

[0036] The embodiments of the present application are described in detail below in combination with the drawings Figures 1 to 13 The multi-dimensional data detection method, device, electronic device, readable storage medium and chip provided by the embodiments of the present application are described in detail through specific embodiments and application scenarios.

[0037] The embodiments of the present application provide a multi-dimensional data detection method, as shown in the following figure. Figure 1 The multi-dimensional data detection method comprises the following steps. Step S100: determining a plurality of data items in a multi-dimensional real-time computing process; Step S102: determining a computing link corresponding to a target data item and a plurality of data source items; Step S104: determining a directed graph according to a plurality of computing links; Step S106: determining a traversal parameter of each data item by traversing a unidirectional path through a depth-first algorithm; Step S108: determining a secondary access data item according to the traversal parameter; Step S110: determining that a unidirectional path taking the secondary access data item as a starting point is an abnormal loop path; Step S112: aborting the computation of the abnormal loop path and determining a plurality of script code blocks corresponding to the abnormal loop path.

[0038] The multi-dimensional data detection method provided by the application can detect and track the computing link in the real-time computing process of the multi-dimensional database in real time, determine the abnormal loop path caused by the change of the business rule in the real-time computing process, and the abnormal loop path is caused by the mutual reference between the unidirectional paths corresponding to the computing link. When the abnormal loop path is detected, the computation of the abnormal loop path is aborted, the data of the abnormal loop path is tracked, and the loop information is returned to the user. The returned information includes the loop information and the plurality of script code blocks corresponding to the abnormal loop path, and the script code blocks include the multi-dimensional rule script information stored in the stack information of the virtual machine, such as the script name and the script code line. The script code blocks are adjusted by the change of the business rule, so that the computing link in the multi-dimensional database is modified.

[0039] It can be understood that by dynamically detecting the loop in the real-time computing process and immediately aborting the abnormal path when the abnormal loop path is detected, the infinite recursion caused by the circular dependency is avoided, the waste of server computing resources is reduced, and the real-time computing efficiency of the enterprise multi-dimensional database is improved.

[0040] Further, by binding the script code blocks and the computing link, the code line causing the abnormal loop path can be quickly located when the abnormal loop path is found, the troubleshooting time is shortened, and the operation and maintenance cost is reduced.

[0041] Specifically, the multi-dimensional database stores aggregation results of different dimensions, each data item is associated with multiple dimensions, such as time data, organization data, and product data. The target data item is the final data that needs to be generated by calculation, and the data source item is the field or dimension combination that provides the original input value in the multi-dimensional data. The target data item and the data source item have a recursive topological relationship, that is, the target data item is calculated through multiple data source items. The calculation link of the target data item corresponding to multiple data source items is determined through the corresponding mathematical rules or business rules in the calculation process, and the mathematical rules or business rules corresponding to the calculation link are modified through the script code block. The directed graph is determined through the calculation link of different dimensions, that is, there is a hierarchical relationship between multiple data items, and a one-way path from the target data item to the data source item is determined according to the hierarchical relationship. The end point of the one-way path is the data item, which is pointed to the data source item through the target data item, indicating the direction of the calculation link. After the directed graph is determined through multiple one-way paths, combined with the depth-first search (DFS), starting from the vertex of the directed graph, traversing to the end along a one-way path, and backtracking to the vertex to traverse other branches. The traversal parameter is the number of traversals of each data item by the depth-first search. In the traversal process, a certain vertex (i.e., data item) is repeatedly accessed, which is determined as the starting point of the abnormal loop path, that is, the data item is accessed twice. The abnormal loop path includes multiple sub-paths starting from the data item accessed twice. By stopping all calculation tasks on the abnormal loop path and reversely tracking the bound script code and path information according to the abnormal path, the further spread of error data is prevented, the troubleshooting time is shortened, and the script code logic problem is quickly located for the enterprise operator.

[0042] Optionally, the path information includes data type, dimension information, and business label, the membership or aggregation relationship between the multiple data items is determined according to the data type, dimension information, and business label in the path information, and the hierarchical relationship between the multiple data source items is determined according to the membership or aggregation relationship.

[0043] Optionally, the traversal of the one-way path by the depth-first search includes any of the following: depth-first traversal implemented by recursion, recording the vertex sequence in the recursion stack; non-recursive depth-first traversal based on a stack structure; hybrid traversal combined with the breadth-first search (BFS), which preferentially detects short path loops in the directed graph.

[0044] Optionally, the abnormal loop path is highlighted in the visualization interface, and the corresponding script code line is displayed.

[0045] Optionally, the hierarchical relationship or business logic relationship between the data source item and the target data item is obtained through editing of the script code block.

[0046] In some embodiments, optionally, as shown in FIG. 1, step S104: determining a directed graph according to the plurality of calculation links comprises: Figure 2 Step S1040: determining path information corresponding to the calculation link; Step S1042: determining a reference relationship between the target data item and the data source item according to the path information; Step S1044: determining a starting point and an ending point corresponding to the calculation link according to the reference relationship; Step S1046: determining a one-way path according to the starting point and the ending point; Step S1048: determining a directed graph according to the plurality of one-way paths.

[0047] In this embodiment, the path information includes a reference relationship between a plurality of data items, and the calculation link includes a mathematical rule in which the target data item corresponds to a plurality of data source items. By defining the membership relationship of the target data item to the data source item, the starting point and the ending point corresponding to the calculation link are determined, and based on the reference relationship, the specific mapping path of the target data item to the data source item, i.e., the one-way path, is determined. The starting point of the one-way path is the target data item, and the ending point of the one-way path is the data source item.

[0048] By determining the directed graph through the plurality of one-way paths, the logical link of data flow is limited, and the calculation dependency relationship between the data source item and the target data item is clarified, thereby reducing the data processing amount in the multi-dimensional data calculation process. By means of the plurality of one-way paths, the hierarchical relationship between a plurality of data items is clarified, and the robustness of multi-dimensional data detection is improved.

[0049] It can be understood that the dependence network between data items is globally displayed through the directed graph structure, a topology model is provided for loop detection, and the multi-dimensional data detection efficiency is improved.

[0050] Optionally, the one-way path in the directed graph corresponds to a calculation priority, and the calculation priority and the traversal priority are positively correlated, i.e., the higher the calculation priority of the one-way path corresponding to the starting point, the higher the traversal priority of the one-way path and a plurality of sub-paths corresponding to the one-way path.

[0051] Optionally, the starting point of the plurality of one-way paths, i.e., the target data item, is determined, and the plurality of one-way paths are grouped and processed in parallel after the starting point.

[0052] Optionally, the dimension hierarchy of the data item is determined through the path information, and the directed graph is hierarchically divided according to the dimension hierarchy, so that the path hierarchy in the directed graph corresponds to the dimension hierarchy of the data item in the multi-dimensional database.

[0053] In some embodiments, optionally, as shown in FIG. 1, step S104: determining a directed graph according to the plurality of calculation links comprises: Figure 3 ​As shown, step S102: determining the computational links of the target data item corresponding to the multiple data source items, further includes: Step S1020: Obtain multi-dimensional script rules; Step S1022: updating the script code block according to the multi-dimensional script rules; Step S1024: Update multiple computing links according to the updated script code block.

[0054] In this embodiment, the multidimensional script rules represent updated business rules. When the system's business rules are updated, the code snippets implementing specific computational logic within the script code blocks are modified based on the multidimensional script rules. The script code corresponding to the updated business rules is determined and stored in the JVM stack, ensuring that the computational logic is synchronized with business requirements in real time.

[0055] Furthermore, multidimensional script rules are configuration rules that define data calculation logic. They are determined based on business rules, which include business requirements, business formulas, and business indicators. When business rules are modified or adjusted, enterprise operators modify the multidimensional script rules by modifying the script code, adjusting the mathematical rules (i.e., mathematical formulas) within the calculation chain, and modifying, adding, or deleting calculation chains.

[0056] As you can understand, by updating script code blocks, multiple computational links are updated, ensuring that data processing flows align with the latest business rules and improving the synchronization between computational links and business rules. Furthermore, when business rules are adjusted (such as adding promotional discounts), there's no need to restructure the system; simply updating the script code and computational links quickly takes effect. This ensures real-time computation and testing of the multidimensional database, reduces operational costs, and improves the efficiency of multidimensional data testing.

[0057] Furthermore, script code block updates support script version tracing and quick rollback. Each time a script code block is updated, an update record is generated, recording the update time, script modification parameters, and change summary. When an update anomaly or an abnormal loop path is detected, it automatically rolls back to the historical version based on the update record.

[0058] In some embodiments, optionally, as Figure 4 As shown, step S108: determining the secondary access data item according to the traversal parameter, including: Step S1080: Determine the data item corresponding to each unidirectional path; Step S1082: Determine the traversal record of the data item; Step S1084: determining the traversal parameter corresponding to the data item according to the traversal record; Step S1086: Determine the traversal parameter threshold; Step S1088: When the traversal parameter of the data item is greater than the traversal parameter threshold, the data item is determined to be a secondary access data item.

[0059] In this embodiment, during the DFS traversal process, a traversal record for each vertex in the directed graph is determined, i.e., a traversal record for the data item corresponding to each unidirectional path. The traversal record includes the state information of each vertex during the traversal process. Based on the state information, whether the data item in the directed graph has been accessed is determined. When the data item has been accessed, the number of times the data item has been accessed is recorded, i.e., the traversal parameter. The traversal parameter threshold is a preset value corresponding to a value of 1. When the number of times a data item has been accessed is greater than the traversal parameter threshold, the data item is determined to be a twice-accessed data item.

[0060] It can be understood that the traversal behavior of the DFS algorithm is converted into analyzable numerical indicators to determine the starting point of the abnormal loop path, quickly locate the secondary access data items that cause the loop, and improve the efficiency of multi-dimensional data detection.

[0061] Furthermore, the state information includes the access state, access timestamp, and position in the recursive stack. The access state includes not accessed, accessing, and access completed. The access timestamp includes the time point corresponding to the access state, i.e., the time corresponding to the start of the access and the time corresponding to the completion of the access. The position in the recursive stack is the level of the data item in the depth-first traversal stack.

[0062] In some embodiments, optionally, as Figure 5 As shown, step S110: determining that the unidirectional path starting from the secondary access data item is an abnormal loop path includes: Step S1100: determining a data source item associated with the secondary access data item according to a reference relationship; Step S1102: determining a primary computation link between a secondary access data item and at least one data source item; Step S1104: Determine a secondary computing link based on the primary computing link, with the end point of the primary computing link being the starting point of the secondary computing link; Step S1106: Determine an abnormal loop path according to the primary computing link and the secondary computing link.

[0063] In this embodiment, an abnormal loop path is determined based on a secondary access data item. The abnormal loop path includes multiple unidirectional paths. The multiple unidirectional paths associated with the secondary access data item are determined through reference relationships. The primary computing link and the secondary computing link associated with the secondary access data item are determined based on the reference relationships. A primary computing link is a unidirectional path directly associated with the secondary access data item, and a secondary computing link is a plurality of subpaths starting from the endpoint of the primary computing link. The secondary computing link includes multiple unidirectional paths of different levels.

[0064] It can be understood that through the linkage analysis of the primary computing link and the secondary computing link, the one-way paths of direct and indirect data dependencies are identified and accessed secondary, avoiding the limitation of detecting only a single layer of dependency, and determining the integrity of the abnormal loop path, thereby improving the robustness of multi-dimensional data detection.

[0065] For example, in a financial model, in the path "net profit → revenue → cost → net profit," net profit is a secondary access data item, and the path is determined to be an abnormal loop path due to closed dependency. "Net profit → revenue" is a primary calculation link, while "revenue → cost" and "cost → net profit" are secondary calculation links.

[0066] Furthermore, after the complete path of the abnormal loop path is determined, the abnormal loop path is highlighted in the visualization interface.

[0067] Furthermore, a hierarchical approach is used to identify primary and secondary computational links, reducing the computational effort required to traverse all links and minimizing resource consumption. Hierarchical detection allows for the immediate termination of multiple computational links starting with a secondary accessed data item upon detection. This provides dynamic detection and termination during real-time computation, preventing further escalation of computational errors caused by circular dependencies and minimizing waste of server computing resources.

[0068] In some embodiments, optionally, as Figure 6 As shown, after step S112: terminating the calculation of the abnormal loop path and determining the multiple script code blocks corresponding to the abnormal loop path, the method further includes: Step S114: determining multiple path information corresponding to the abnormal loop path; Step S116: Determine data tracking information according to the path information and the script code block.

[0069] In this embodiment, after the calculation of the abnormal loop path is terminated, the path information and script code block are returned to the system user as data tracking information, so that the user can perform complete context information detection on the abnormal loop path, providing a data basis for tracing the abnormal loop problem. Among them, the path information includes data type, dimension information and business label, and the script code block includes the script file name, script code line and script code snippet. By returning the script code block, the script is bound to the calculation logic, and the operational repair basis is determined. The enterprise operator repairs the abnormal loop path by modifying the corresponding script code block.

[0070] It can be understood that the script code is located through path information integration. In combination with the script code and the path information, the data tracking information is determined, the loop information is returned, so that the user can intuitively understand the complete information of the abnormal loop path and the corresponding script code, improve the repair efficiency when the abnormal loop is detected in the multi-dimensional data calculation process, and reduce the operation and maintenance cost.

[0071] Optionally, record the script code modification patch of each abnormal loop path; construct a training data set according to the historical abnormal loop path and the corresponding script code modification patch; and automatically generate a reference script code patch through the training data set.

[0072] Optionally, determine the data deviation value caused by the abnormal loop path; determine the business index affected by the abnormal loop path; determine the repair priority corresponding to the business index according to the data deviation value, and the greater the data deviation value, the higher the repair priority; and repair sort the multiple abnormal loop paths according to the repair priority.

[0073] In one specific embodiment, the multi-dimensional data detection method comprises: Step one: determine the calculation link, that is, a business data (target data item) is calculated from several other business data (data source item), and the several associated business data are calculated from other business data. The data item association is as shown in Figure 9 The target data item A is determined by multiplying data source item B and data source item C; when data item B is the target data item, the target data item B is determined by adding data source item E and data source item F; and when data item C is the target data item, the target data item C is determined by subtracting data source item H from data source item G.

[0074] The logic of the calculation is realized by writing the multi-dimensional script rules of the business, and these calculation rules containing the business data path form the calculation link in the process of real-time calculation. The calculation link is as shown in Figure 10 The target data item A is determined by the calculation rule BxC, the target data item B is determined by the calculation rule E+F, and the target data item C is determined by the calculation rule G-H. The calculation link includes the mathematical rules used for calculation.

[0075] Step two: data tracking, the data tracking information includes two parts, one part is the path information list participating in the calculation, and the other part is the script code information corresponding to the calculation logic. The data tracking principle diagram is as shown in Figure 11 ​As shown: data tracking is performed on the path corresponding to the target data item A, and it is found that the target data item A is calculated by the calculation rule 1: BxC. The path information B and C is referenced in the calculation rule, and the path information of B and C including dimension information and numerical value is recorded in the tracking path list. Then, the multi-dimensional rule script information including script name and script code line is found in the stack information of JVM. Through the information, the script code block 1 is located, and the script information is placed in the code information of the tracked calculation path. At this time, the first layer of data tracking is completed.

[0076] The second layer of tracking information is obtained by continuing data tracking on the path corresponding to the target data item C, that is, the target data item C is calculated by the calculation rule 2: E+F. The path information E and F is referenced in the calculation rule, and the path information of E and F including dimension information and numerical value is recorded in the tracking path list. Then, the multi-dimensional rule script information including script name and script code line is found in the stack information of JVM. Through the information, the script code block 2 is located, and the script information is placed in the code information of the tracked calculation path. At this time, the second layer of data tracking is completed.

[0077] The third layer of tracking information is obtained by continuing data tracking on the path corresponding to the target data item F, that is, the target data item F is calculated by the calculation rule 3: G-H. The path information G and H is referenced in the calculation rule, and the path information of G and H including dimension information and numerical value is recorded in the tracking path list. Then, the multi-dimensional rule script information including script name and script code line is found in the stack information of JVM. Through the information, the script code block 3 is located, and the script information is placed in the code information of the tracked calculation path. At this time, the third layer of data tracking is completed.

[0078] Step three: loop detection, in the calculation link of multi-dimensional real-time calculation, a loop appears in the calculation link due to improper rule writing, and the loop schematic diagram is as shown in Figure 12 The target data item A is calculated by the calculation logic 1, wherein the calculation logic 1 of the target data item A references the data item B. When the data item B is the target data item, the target data item B is calculated by the calculation logic 2, and the calculation logic 2 of the target data item B references the data item A.

[0079] Such a loop appears because of the mutual reference between the paths, and the reference relationship between the paths can be constructed as a directed graph in a data structure. Then, whether there is a loop in the directed graph is detected to achieve the loop detection effect of the calculation link. The method of constructing the directed graph is as follows: 1. The path is regarded as the vertex of the directed graph; 2. The reference relationship between the paths is regarded as the edge of the directed graph; 3. Point reference relationship determination, such as: A references B, which means A points to B.

[0080] Step four: Constructing a directed graph: according to the above requirements, add the vertices and edges of the directed graph when calculating the reference path each time, and construct the directed graph of the calculation link. The directed graph is shown in Figure 13 The starting point of the directed graph is target data item A, which is determined by data source item B and data source item C, that is, A references B and C, and the edges in the directed graph with A as the starting point are A pointing to B and A pointing to C; when data item B is the target data item, the target data item B is determined by data source item D, that is, B references D, and the edge in the directed graph with B as the starting point is B pointing to D; when data item C is the target data item, the target data item C is determined by data source item E and data source item G, that is, C references E and G, and the edges in the directed graph with C as the starting point are C pointing to E and C pointing to G. Similarly, when data item D is the target data item, the target data item D is determined by data source item E, that is, D references E, and the edge in the directed graph with D as the starting point is D pointing to E; when data item G is the target data item, the target data item G is determined by data source item F, that is, G references F, and the edge in the directed graph with G as the starting point is G pointing to F. When data item F is the target data item, the target data item F is determined by data source item C, that is, F references C, and the edge in the directed graph with F as the starting point is F pointing to C, at this time, C, G and F three vertices form a loop, and C is a secondary access data item.

[0081] Depth-first search (DFS) detection: based on the depth-first traversal mechanism, DFS can traverse the vertices of the directed graph through recursion or stack, and record the visited vertices. When DFS encounters a vertex that has been visited during traversal, it means that a loop has been found. Through this mechanism, it can be detected that Figure 13 C, G, and F form a loop, and if a loop appears, the subsequent calculation of the secondary access data item C will be terminated.

[0082] Step five: return the loop information, and the path information of the loop and the corresponding script rule code can be viewed in the data tracking list.

[0083] It can be understood that the data tracking calculation link is convenient for determining the data source and the calculation logic; further, through the detection of the directed graph, it is convenient to modify the business rules to avoid the waste of business resources.

[0084] As shown in Figure 7As shown, an embodiment of the present application also provides a multidimensional data detection device 900, including: a link module 902, which is used to determine multiple data items in a multidimensional real-time calculation process, the data items including data source items and target data items; determine the calculation links corresponding to the target data items corresponding to the multiple data source items, and the calculation links are bound to script code blocks; a traversal module 904, which is used to determine a directed graph based on the multiple calculation links, the directed graph including multiple unidirectional paths, and the endpoints of the unidirectional paths are data items; traverse the unidirectional paths through a depth-first algorithm to determine the traversal parameters of each data item; a loop module 906, which is used to determine the secondary access data items based on the traversal parameters; determine the unidirectional path with the secondary access data item as the starting point as an abnormal loop path; a tracking module 908, which is used to terminate the calculation of the abnormal loop path and determine the multiple script code blocks corresponding to the abnormal loop path.

[0085] The multidimensional data detection device 900 provided by the present invention performs real-time detection and data tracking on computation links during the real-time computation of a multidimensional database, identifying abnormal loop paths that may occur in the computation links due to changes in business rules during the real-time computation. Abnormal loop paths are caused by mutual references between unidirectional paths corresponding to the computation links. When an abnormal loop path is detected, the computation of the abnormal loop path is terminated, the data of the abnormal loop path is tracked, and the loop information is returned to the user. The returned information includes the loop information and multiple script code blocks corresponding to the abnormal loop path. The script code blocks include multidimensional rule script information stored in the JVM stack information, such as script name and script code lines. The script code blocks are adjusted based on changes in business rules, thereby modifying the computation links in the multidimensional database. When an abnormal loop path is detected, the abnormal path is immediately terminated, data tracking information is returned, and the script code corresponding to the abnormal loop path is modified to repair the abnormal loop path.

[0086] like Figure 8 As shown, an embodiment of the present application also provides an electronic device 1000, including a processor 1110, a memory 1109, and a program or instruction stored in the memory 1109 and executable on the processor 1110. When the program or instruction is executed by the processor 1110, the various processes of the embodiment of the above-mentioned multidimensional data detection method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0087] Optionally, the processor 1110 is configured to determine a plurality of data items during a multi-dimensional real-time calculation process, the data items including a data source item and a target data item; Optionally, the processor 1110 is further configured to determine that the target data item corresponds to a computing link of multiple data source items, where the computing link is bound to a script code block; Optionally, the processor 1110 is further configured to determine a directed graph according to the plurality of computing links, the directed graph comprising a plurality of one-way paths, and endpoints of the one-way paths being the data items. Optionally, the processor 1110 is further configured to determine a traversal parameter of each data item by traversing the one-way paths through a depth-first algorithm. Optionally, the processor 1110 is further configured to determine a second-access data item according to the traversal parameter. Optionally, the processor 1110 is further configured to determine that a one-way path taking the second-access data item as a starting point is an abnormal loop path. Optionally, the processor 1110 is further configured to abort the computation of the abnormal loop path, and determine a plurality of script code blocks corresponding to the abnormal loop path.

[0088] The memory 1109 can be configured to store software programs and various data. The memory 1109 can mainly include a first storage area storing programs or instructions, and a second storage area storing data. The first storage area can store an operating system, at least one application program or instruction required by a function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 1109 can include a volatile memory or a non-volatile memory, or the memory 1109 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 1109 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0089] The present application also provides a readable storage medium having a program or instruction stored thereon. When executed by a processor, the program or instruction implements the various processes of the multidimensional data detection method described above and achieves the same technical effects. To avoid repetition, the description thereof is omitted here. Furthermore, the readable storage medium improves the data storage capacity and data processing speed corresponding to the multidimensional data detection method described herein.

[0090] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory cards, floppy disks, encoding mechanical devices (such as punched cards or grooves with raised structures containing recorded instructions), and any suitable combination of the foregoing. As used herein, computer-readable storage medium should not be understood to refer to transmission signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted via wires.

[0091] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.

[0092] The present application also provides a chip comprising a processor and a communication interface coupled to the processor, the processor being configured to execute programs or instructions to implement the various processes of the aforementioned multidimensional data detection method embodiment, achieving the same technical effects. To avoid repetition, these are not described here. Furthermore, the chip improves the data processing speed corresponding to the multidimensional data detection method of the present application.

[0093] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0094] In the present application, the terms "first", "second", "third" are only used for descriptive purpose, and should not be understood as indicating or implying relative importance. The term "multiple" refers to two or more, unless otherwise explicitly limited. The terms "mount", "connect", "connection", "fix", and the like should be interpreted broadly, for example, "connection" can be fixed connection, or detachable connection, or integral connection; "connection" can be direct connection, or indirect connection through intermediate medium. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0095] In the description of the present application, it should be understood that the terms "upper", "lower", "left", "right", "front", "back", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or unit referred to must have a particular direction, be constructed and operated in a particular orientation, therefore, should not be understood as a limitation on the present application.

[0096] In the description of the present application, the terms "one embodiment", "some embodiments", "a specific embodiment", and the like, mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0097] The above is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A multidimensional data detection method, characterized in that: include: Determining a plurality of data items during a multi-dimensional real-time calculation process, wherein the data items include data source items and target data items; Determining that the target data item corresponds to a computing link of the plurality of data source items, wherein the computing link is bound to a script code block; Determine a directed graph according to the plurality of computing links, wherein the directed graph includes a plurality of unidirectional paths, and endpoints of the unidirectional paths are the data items; Traversing the unidirectional path using a depth-first algorithm to determine a traversal parameter for each data item; determining a secondary access data item according to the traversal parameter; determining a one-way path starting from the secondary access data item as an abnormal loop path; The calculation of the abnormal loop path is terminated, and a plurality of the script code blocks corresponding to the abnormal loop path are determined.

2. The multidimensional data detection method according to claim 1, characterized in that: Determining a directed graph according to the plurality of computing links includes: determining path information corresponding to the computation link; Determine a reference relationship between the target data item and the data source item according to the path information; Determine the starting point and the end point corresponding to the computing link according to the reference relationship; determining the one-way path according to the starting point and the end point; A directed graph is determined according to the plurality of unidirectional paths.

3. The multidimensional data detection method according to claim 1, characterized in that: The determining that the target data item corresponds to a computing link of the plurality of data source items further includes: Get multi-dimensional script rules; Updating the script code block according to the multidimensional script rule; The plurality of computing links are updated according to the updated script code block.

4. The multidimensional data detection method according to claim 1, wherein: The determining of the secondary access data item according to the traversal parameter includes: Determining the data item corresponding to each of the unidirectional paths; Determining a traversal record of the data item; Determining a traversal parameter corresponding to the data item according to the traversal record; Determine the ergodic parameter threshold; When the traversal parameter of the data item is greater than the traversal parameter threshold, the data item is determined to be a secondary access data item.

5. The multidimensional data detection method according to claim 2, characterized in that: Determining that the one-way path starting from the secondary access data item is an abnormal loop path includes: Determining the data source item associated with the secondary access data item according to the reference relationship; determining a primary computational link between the secondary access data item and at least one of the data source items; Determine a secondary computing link according to the primary computing link, where the end point of the primary computing link is the starting point of the secondary computing link; An abnormal loop path is determined according to the primary computing link and the secondary computing link.

6. The multidimensional data detection method according to any one of claims 1 to 5, characterized in that: After terminating the calculation of the abnormal loop path and determining the plurality of script code blocks corresponding to the abnormal loop path, the method further includes: Determining multiple path information corresponding to the abnormal loop path; Data tracking information is determined according to the path information and the script code block.

7. A multidimensional data detection device, characterized in that: include: a link module, configured to determine a plurality of data items in a multi-dimensional real-time calculation process, wherein the data items include a data source item and a target data item; Determining that the target data item corresponds to a computing link of the plurality of data source items, wherein the computing link is bound to a script code block; a traversal module, configured to determine a directed graph based on the plurality of computing links, the directed graph comprising a plurality of unidirectional paths, the endpoints of the unidirectional paths being the data items; and traversing the unidirectional paths using a depth-first algorithm to determine a traversal parameter for each data item; A loop module, configured to determine a secondary access data item according to the traversal parameter; and determine a unidirectional path starting from the secondary access data item as an abnormal loop path; A tracing module is used to terminate the calculation of the abnormal loop path and determine the multiple script code blocks corresponding to the abnormal loop path.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the multidimensional data detection method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the multidimensional data detection method according to any one of claims 1 to 6 are implemented.

10. A chip, characterized in that: The chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps of the multi-dimensional data detection method according to any one of claims 1 to 6.