Method, device, electronic device and computer program product for index decomposition
Through automated analysis tools and large models combined with data blood tracing technology, the automation of indicator disassembly is achieved, the problem of manual operation dependence in the existing technology is solved, efficiency and accuracy are improved, and it is suitable for modern big data environments.
Patent Information
- Application Number
- CN202411657774.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The existing technology relies on manual operations during the indicator disassembly, resulting in large workload, low efficiency, and error-prone, which cannot meet the requirements of modern big data environment for efficiency and accuracy.
Through automated analysis tools, business-related indicator information is extracted from complex SQL statements, and the big model is combined with data blood tracing technology to automatically identify and disassemble the business caliber in SQL, and decompose complex indicators into atomic indicators and modify them. Elements such as words and time periods.
It effectively reduces the dependence of manual operations, improves the efficiency of large-scale data processing, ensures the accuracy and consistency of indicator disassembly, reduces the risk of manual errors, and significantly improves the efficiency and quality of indicator disassembly.
Smart Images

Figure CN119149576B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to a method, device, electronic device and computer program product for index decomposition. Background Art
[0002] As the application of data-driven decision-making in enterprises continues to deepen, the importance of systematic indicator construction has become increasingly prominent. In addition, with the increase in data volume and the complexity of business scenarios, systematic indicator construction can not only simplify the data management process, but also help enterprises quickly identify problems and optimize resource allocation, thereby improving overall operational efficiency and competitiveness.
[0003] As the application of indicator systematization in various enterprises becomes more and more widespread, the importance of indicator decomposition has gradually become prominent. Indicator systematization has brought about a more complex indicator framework. In order to ensure the accuracy and consistency of each indicator, it is necessary to decompose it in detail. Through effective indicator decomposition, complex comprehensive indicators can be decomposed into operational atomic indicators, which is convenient for in-depth analysis and optimization. Summary of the invention
[0004] Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer program product for index decomposition.
[0005] According to a first aspect of the present disclosure, a method for index decomposition is provided. The method includes obtaining an original query statement, the original query statement includes a target index to be decomposed, and the data table in the original query statement comes from the application layer of the data warehouse. The method also includes tracing back the original query statement to generate an expanded query statement corresponding to the original query statement, the expanded query statement includes a data table from the data detail layer in the data warehouse. The method also includes clipping the expanded query statement to generate a clipped query statement, the clipped query statement includes a query logic and a filtering condition for generating the target index based on the atomic index. The method also includes determining, based on the clipped query statement, a target atomic index, a target time period, and a target modifier corresponding to the target index using a language model based on the query logic and the filtering condition related to the atomic index. In addition, the method also includes determining a decomposition result of the target index based on the target atomic index, the target time period, and the target modifier.
[0006] According to a second aspect of the present disclosure, a device for index disassembly is provided. The device includes a query statement acquisition module, configured to acquire an original query statement, the original query statement includes a target indicator to be disassembled, and the data table in the original query statement comes from the application layer of the data warehouse. The device also includes a query statement expansion module, configured to generate an expanded query statement corresponding to the original query statement by tracing upward the original query statement, the expanded query statement includes a data table from the data detail layer in the data warehouse. The device also includes a query statement clipping module, configured to generate a clipped query statement by clipping the expanded query statement, the clipped query statement includes a query logic and a screening condition for generating the target indicator based on the atomic indicator. The device also includes a target element determination module, configured to determine the target atomic indicator, the target time period and the target modifier corresponding to the target indicator based on the clipped query statement and the query logic and the screening condition related to the atomic indicator using a language model. In addition, the device also includes a disassembly result determination module, configured to determine the disassembly result of the target indicator based on the target atomic indicator, the target time period and the target modifier.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory coupled to the processor, wherein the memory has instructions stored therein, and when the instructions are executed by the processor, the electronic device executes the method according to the first aspect.
[0008] In a fourth aspect of the present disclosure, a computer program product is provided, which is tangibly stored on a non-transitory computer readable medium and includes computer executable instructions, which when executed cause a computer to perform the steps of the method of the first aspect of the present disclosure.
[0009] The purpose of this Summary is to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0011] Figure 1 A schematic diagram showing an example environment in which devices and / or methods according to embodiments of the present disclosure may be implemented;
[0012] Figure 2 A flow chart of a method for index decomposition according to an embodiment of the present disclosure is shown;
[0013] Figure 3 A schematic diagram of an automatic decomposition process of indicators based on a language model according to an embodiment of the present disclosure is shown;
[0014] Figure 4 A block diagram showing an apparatus for index disassembly according to an embodiment of the present disclosure; and
[0015] Figure 5 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0016] Throughout the drawings, the same or similar reference numbers denote the same or similar elements. DETAILED DESCRIPTION
[0017] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information (such as voice) involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless explicitly stated. Other explicit and implicit definitions may also be included below.
[0020] As mentioned earlier, with the development of indicator systematization, complex indicator architecture needs to ensure accuracy and consistency through effective indicator decomposition. Indicator decomposition is the process of breaking down complex data indicators into more basic components, with the goal of making data analysis more intuitive, easy to understand and operate. In data systems, there are usually a large amount of complex data, which generates different indicators through various statistics and processing. In order to ensure the consistency and accuracy of these indicators in the system, they must be decomposed into atomic indicators (such as viewing PV), modifiers (such as short video applications), time periods (such as the last 1 day) and other elements. This decomposition process helps to understand how each indicator is constructed, facilitates further analysis and management, and improves the reusability and accuracy of the model.
[0021] In related technologies, indicator disassembly mainly relies on manual operations, resulting in heavy workload and low efficiency. Users usually need to manually track and trim SQL statements based on data lineage, retaining only relevant parts. The entire process is highly dependent on the professional ability of developers, and the operation is cumbersome and difficult to adapt to the needs of large-scale data processing. In addition, manual disassembly methods are prone to errors, involving a large amount of metadata information and complex business processes, which increases the risk of errors in operations. Therefore, the existing technology is inefficient and difficult to guarantee accuracy, and cannot meet the requirements of modern big data environments for efficiency and accuracy.
[0022] To this end, an embodiment of the present disclosure provides a method for indicator decomposition. First, business-related indicator information is extracted from complex SQL statements through automated analysis tools. The tool uses a large model combined with data lineage tracking technology to automatically identify and decompose the business caliber in SQL, and decompose complex indicators into elements such as atomic indicators, modifiers, and time periods. Then, based on preset rules, the system structures the decomposed elements to ensure that the logical relationship between each indicator is clear. Finally, through automated verification and optimization functions, the accuracy and consistency of indicator decomposition are further improved, making it more suitable for analysis and application in large-scale data environments.
[0023] Therefore, through the embodiments of the present disclosure, the automated indicator disassembly method effectively reduces the reliance on manual operations and improves the efficiency of large-scale data processing. Combining language models with data lineage tracking technology, it is possible to accurately identify and disassemble the indicator caliber in SQL, ensure the accuracy and consistency of indicators during the disassembly process, reduce the risk of manual errors, and reduce the workload of users, significantly improving the efficiency and quality of indicator disassembly.
[0024] Figure 1 Schematic diagram of an example environment in which the device and / or method according to an embodiment of the present disclosure may be implemented. Figure 1As shown, the example environment 100 may include a computing device 110, which may be a user terminal, a mobile device, a computer, etc., or may be a computing system, a single server, a distributed server, or a cloud-based server. The computing device 110 may obtain an original query statement 120 and a target indicator 130 to be disassembled. For example, the original query statement 120 may include the target indicator 130, and the original data table in the original query statement 120 comes from the application layer of the data warehouse. For example, a user may input an original query statement and specify one or more indicators in the original query statement as the target indicator to be disassembled.
[0025] Data warehouses are used to store and manage large amounts of structured and unstructured data, and integrate data from different business systems, providing a centralized storage environment for easy analysis and use. Data warehouses are usually divided into multiple layers, where the application layer contains data that has been cleaned, aggregated, and calculated for direct use by users or systems. Data at the application layer is usually generated through complex calculations based on multiple data sources and dimensions. To facilitate the understanding and optimization of these high-level indicators, the disassembly process can decompose them into elements such as atomic indicators, modifiers, and time periods. This not only helps users trace the source of data and calculation logic, but also improves the reusability and consistency of basic indicators.
[0026] Indicator decomposition is a key step in the systematic construction of indicators, involving two aspects: basic information configuration and indicator decomposition definition. In the basic information configuration, the system defines various types of information related to indicators, including data domains, business processes, metrics, modifiers, statistical granularity, time periods, indicator units, and data types. Atomic indicators are used to represent basic metrics, derived indicators are generated by combining modifiers and time periods, and composite indicators are obtained through further calculations and logical combinations. Through this decomposition process, complex indicators in the data warehouse mart layer SQL can be mapped to predefined atomic indicators, modifiers, and time periods, thereby establishing an association with data detail layer indicators.
[0027] The computing device 110 can generate an expanded query statement 140 corresponding to the original query statement 120 by tracing back the original query statement 120, wherein the expanded query statement 140 includes a data table from the data detail layer in the data warehouse. For example, the table structure in the original query statement 120 can be analyzed to gradually trace back its data source, thereby generating an expanded query statement 140 containing more detailed data. The computing device 110 can generate a trimmed query statement 150 by trimming the expanded query statement 140, wherein the trimmed query statement 150 includes query logic and filter conditions for generating the target indicator 130 based on the atomic indicator. For example, redundant fields and filter conditions that are not related to the target indicator 130 can be removed, and the core calculation logic required to generate the target indicator 130 can be retained.
[0028] The computing device 110 can determine the target atomic indicator 160, the target time period 170, and the target modifier 180 corresponding to the target indicator 130 based on the tailored query statement 150 and the query logic and screening conditions related to the atomic indicator using the language model. For example, a corresponding prompt word can be generated to guide the language model to determine the corresponding atomic indicator and modifier based on the tailored query statement 150, and determine the applicable time period in combination with the time screening condition. The computing device 110 can determine the disassembly result 190 of the target indicator 130 based on the target atomic indicator 160, the target time period 170, and the target modifier 180. For example, these disassembled elements can be combined to generate the final disassembly result, so that the user can clearly understand the components and calculation logic of the target indicator. In this way, the user can trace the source of the target indicator and apply it to different business scenarios to meet various analysis needs.
[0029] It should be understood that the architecture and functions in the example environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. Embodiments of the present disclosure may also be applied to other environments with different structures and / or functions.
[0030] The following will combine Figures 2 to 5 The process according to the embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the present disclosure is not limited in this respect.
[0031] Figure 2 A flowchart of a method 200 for decomposing an indicator according to an embodiment of the present disclosure is shown. The method can be executed by a computing device, which can be a user terminal, a mobile device, a computer, etc. It can also be a computing system, a single server, a distributed server, or a cloud-based server. At box 202, an original query statement can be obtained, the original query statement includes the target indicator to be decomposed, and the data table in the original query statement comes from the application layer of the data warehouse. For example, refer to Figure 1 The computing device 110 may obtain an original query statement 120 , wherein the original query statement 120 includes a target indicator 130 to be decomposed, and a data table in the original query statement 120 comes from an application layer of a data warehouse.
[0032] At block 204, an expanded query statement corresponding to the original query statement may be generated by tracing upward the original query statement, the expanded query statement including a data table from a data detail layer in the data warehouse. Figure 1The computing device 110 may generate an expanded query statement 140 corresponding to the original query statement 120 by tracing upward the original query statement 120, and the expanded query statement 140 includes a data table from the data detail layer in the data warehouse. At block 206, the expanded query statement may be trimmed to generate a trimmed query statement, and the trimmed query statement includes query logic and filter conditions for generating the target indicator based on the atomic indicator. For example, referring to Figure 1 The computing device 110 may generate a tailored query statement 150 by tailoring the expanded query statement 140 , wherein the tailored query statement 150 includes query logic and screening conditions for generating the target indicator 130 based on the atomic indicator.
[0033] At block 208, based on the tailored query statement, a target atomic indicator, a target time period, and a target modifier corresponding to the target indicator may be determined using a language model based on the query logic and the screening condition related to the atomic indicator. Figure 1 , the computing device 110 may determine the target atomic indicator 160, the target time period 170, and the target modifier 180 corresponding to the target indicator 130 based on the tailored query statement 150 and the query logic and the screening condition related to the atomic indicator using the language model. At block 210, the decomposition result of the target indicator may be determined based on the target atomic indicator, the target time period, and the target modifier. For example, referring to Figure 1 The computing device 110 may determine a decomposition result 190 of the target indicator 130 based on the target atomic indicator 160 , the target time period 170 , and the target modifier 180 .
[0034] Therefore, according to the method 200 of the embodiment of the present disclosure, the automated indicator disassembly method effectively reduces the reliance on manual operations and improves the efficiency of large-scale data processing. Combining the language model with data lineage tracking, it is possible to accurately identify and disassemble the indicator caliber in SQL, ensure the accuracy and consistency of the indicators during the disassembly process, reduce the risk of manual errors, and reduce the workload of users, significantly improving the efficiency and quality of indicator disassembly.
[0035] Figure 3 FIG. 3 is a schematic diagram of an automatic decomposition process 300 of indicators based on a language model according to an embodiment of the present disclosure. Figure 3As shown, user 302 can input the SQL statement to be disassembled and the target field to be disassembled. For example, user 302 can provide an SQL query statement related to video clicks, page views, or user viewing time, and can specify the target field to be disassembled, such as video clicks, video playback time, etc. The main function of indicator disassembly is to map the SQL of the application layer processed in the data warehouse to the three elements of the defined indicators, namely atomic indicators (located in the data detail layer), modifiers, and time periods. Through this mapping relationship, the association between the indicators of the application layer and the atomic indicators of the data detail layer can be established. This not only helps to realize the systematic construction and management of indicators in the data warehouse, but also improves the reusability and consistency of the data warehouse model.
[0036] At box 304, the SQL creation statement of the target data table can be obtained. For example, if the SQL query statement provided by user 302 involves fetching data from the target data table, then the SQL creation statement of the target data table can be obtained. The SQL creation statement of the target data table can provide key information about the structure of the data table, including the field definition, data type, primary key, index, and relationship with other tables in the table. This information helps the system understand the internal structure of the target table, determine the specific purpose of each field in the table, and provide the necessary basis for subsequent lineage analysis, inline analysis, etc.
[0037] At block 306, the lineage of the target data table may be analyzed. In some embodiments, the data table from the data detail layer related to the target indicator may be determined based on the data table in the original query statement by tracing back the data lineage relationship in the data warehouse. In some embodiments, the expanded query statement corresponding to the original query statement may be generated based on the fields in the data table from the data detail layer by constructing a query logic including an atomic indicator for generating the target indicator.
[0038] Lineage analysis is used to trace the data sources and their relationships related to the target table to identify how the data is processed from the source through multiple steps to reach the current target data table. The lineage analysis process can be implemented by using the graph database 308 and the distributed database 310. For example, the path of data flow can be quickly identified by traversing the nodes and edges in the graph database 308. In addition, the distributed database 310 can store and manage a large amount of distributed data, thereby supporting data lineage tracing across multiple data sources and helping to identify the transfer and conversion of data between different tables and different storage locations. In some embodiments, it can be determined whether the expanded query statement needs to be further expanded based on a predetermined condition. For example, when the expansion reaches the common layer of the data warehouse, further expansion can be stopped because at this time the element disassembly judgment can be made based on the expanded SQL statement.
[0039] In box 312, inline analysis of the clause can be performed. For example, the data tables and their associated logic in the "FROM" clause in the SQL statement can be analyzed. When processing SQL queries, some queries may rely on external tables or views to obtain data. Through inline analysis, these external references can be resolved and embedded directly into the SQL statement of the current query. This inline process not only eliminates the dependence on external tables or views, but also simplifies the data flow path, making subsequent query execution more efficient and ensuring that external dependencies are not affected when analyzing and processing data.
[0040] At box 314, semantic analysis can be performed. For example, the meaning of these fields and conditions in the business can be identified by parsing the fields, filter conditions and aggregate functions in the SQL statement. Semantic analysis is used to understand the business meaning in the SQL statement and extract the fields, filter conditions and calculation logic related to the business goals. At box 316, a column logic clipping operation can be performed. In some embodiments, redundant data tables, redundant fields and redundant filter conditions that are unrelated to the target indicator can be determined by analyzing the fields and conditions in the expanded query statement. In some embodiments, a clipped query statement can be generated by deleting redundant parts that are unrelated to the target indicator and retaining the fields and filter conditions for the atomic indicators, time periods and modifiers used to query the target indicator.
[0041] For example, all fields and filter conditions in the SQL query can be analyzed to determine which fields and conditions are irrelevant to the target indicator to be disassembled. Through column logic pruning, redundant fields and irrelevant filter conditions can be deleted, thereby simplifying the query logic. For example, if the SQL query contains multiple fields, such as "user_id", "video_views", and "purchase_count", "purchase_count" is irrelevant to the target indicator (such as the number of video views). Through column logic pruning, the system can delete the "purchase_count" field and only retain the fields related to video viewing. In this way, the generated trimmed query statement only retains the logic and conditions related to the target indicator, improving the accuracy and efficiency of the disassembly. Column logic pruning is used to delete redundant columns that are irrelevant to the target indicator, and retain the key columns and conditions used to generate the target indicator. In some embodiments, secondary pruning can be performed to further remove unnecessary parts, making the query statement more streamlined and ensuring that the trimmed query statement only contains the core content related to the target indicator.
[0042] The pruned SQL statement can be associated with metadata through a language model 326. The language model 326 uses the indicator disassembly rules 322 and indicator disassembly samples 324 associated with the metadata 320 to generate a disassembly result 330 of the target indicator, and the disassembly result 330 can be displayed to the user 302. In some embodiments, a first prompt word can be generated based on the query logic, the pruned query statement, and the atomic indicator recall strategy, and the target atomic indicator is determined using a language model. For example, a language model can receive an input atomic indicator technical caliber code (i.e., query logic) and a pruned SQL statement, and generate a target atomic indicator based on a recall rule, wherein the recall rule can be one or more recall samples to prompt the language model to recall the atomic indicator.
[0043] In some embodiments, a second prompt word may be generated based on the time filter condition and the time period judgment strategy in the tailored query statement, and based on the second prompt word, the target time period associated with the target indicator may be determined using the language model. For example, the language model may receive the tailored SQL statement and the time period judgment rule, and parse out the time filter condition related to the target indicator, for example, the target time period may be determined to be "the last day".
[0044] In some embodiments, a third prompt word can be generated based on the dimension screening conditions and dimension judgment strategies in the trimmed query statement, and based on the third prompt word, the target modifier associated with the target indicator can be determined using the language model. For example, the language model can receive the target SQL and the dimension judgment rules, and identify the dimension fields involved in the SQL and their corresponding dimension enumeration values. In addition, the dimension enumeration value information can be obtained through the interface based on the returned dimension field, and the maintained modifiers can be associated to obtain a set of candidate modifiers. In some embodiments, the language model can be used to determine the most similar modifier based on the dimension enumeration value and the set of candidate modifiers.
[0045] The disassembly result 330 may include atomic indicators, time periods, and modifiers related to the target indicator. In some embodiments, additional information associated with the target indicator may be determined, and the additional information may include at least one of the data domain to which the target indicator belongs, the corresponding business process, the data type, the indicator unit, and the technical caliber description. In addition, the disassembly result and the additional information may be displayed to the user 302.
[0046] Figure 4 FIG. 4 is a block diagram of an apparatus 400 for decomposing an indicator according to some embodiments of the present disclosure. Figure 4As shown, the apparatus 400 includes a query statement acquisition module 402, which is configured to acquire an original query statement, wherein the original query statement includes a target indicator to be disassembled, and the data table in the original query statement comes from the application layer of the data warehouse. The apparatus 400 also includes a query statement expansion module 404, which is configured to generate an expanded query statement corresponding to the original query statement by tracing upward the original query statement, wherein the expanded query statement includes a data table from the data detail layer in the data warehouse.
[0047] The device 400 also includes a query statement clipping module 406, which is configured to generate a clipped query statement by clipping the expanded query statement, and the clipped query statement includes a query logic and a filtering condition for generating the target indicator based on the atomic indicator. The device 400 also includes a target element determination module 408, which is configured to determine the target atomic indicator, the target time period, and the target modifier corresponding to the target indicator based on the clipped query statement and the query logic and the filtering condition related to the atomic indicator using a language model. In addition, the device 400 also includes a disassembly result determination module 410, which is configured to determine the disassembly result of the target indicator based on the target atomic indicator, the target time period, and the target modifier.
[0048] Figure 5 A block diagram of an electronic device 500 is shown in accordance with some embodiments of the present disclosure. Figure 5 1 shows a block diagram of an electronic device 500 according to some embodiments of the present disclosure, and the device 500 may be a device or apparatus described in an embodiment of the present disclosure. Figure 5 As shown, the device 500 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The CPU / GPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504. Although not shown in FIG. Figure 5 As shown in FIG. 5 , device 500 may further include a co-processor.
[0049] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0050] The various methods or processes described above may be performed by the CPU / GPU 501. For example, in some embodiments, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the CPU / GPU 501, one or more steps or actions in the methods or processes described above may be performed.
[0051] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0052] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0053] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0054] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0055] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0056] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0057] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the equipment, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved. It should also be noted that each frame in the block diagram and / or flow chart, and the combination of frames in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0058] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
[0059] Some example implementations of the present disclosure are listed below.
[0060] Example 1. A method for decomposing an indicator, including:
[0061] Obtaining an original query statement, wherein the original query statement includes a target indicator to be decomposed, and a data table in the original query statement comes from an application layer of a data warehouse;
[0062] By tracing back the original query statement, an expanded query statement corresponding to the original query statement is generated, wherein the expanded query statement includes a data table from a data detail layer in the data warehouse;
[0063] By tailoring the expanded query statement, a tailored query statement is generated, wherein the tailored query statement includes query logic and screening conditions for generating the target indicator based on the atomic indicator;
[0064] Based on the tailored query statement, using a language model based on the query logic and the screening condition related to the atomic indicator, determining a target atomic indicator, a target time period, and a target modifier corresponding to the target indicator; and
[0065] Based on the target atomic indicator, the target time period and the target modifier, a decomposition result of the target indicator is determined.
[0066] Example 2. The method according to Example 1, wherein generating the expanded query statement corresponding to the original query statement comprises:
[0067] Based on the data table in the original query statement, the data table of the data detail layer associated with the target indicator is determined by tracing upward the lineage relationship of the data table in the data warehouse; and
[0068] The expanded query statement corresponding to the original query statement is generated by constructing a query logic including an atomic indicator for generating the target indicator based on the fields in the data table of the data detail layer.
[0069] Example 3. The method according to any one of Examples 1-2, wherein generating the tailored query statement comprises:
[0070] Determine redundant content irrelevant to the target indicator by analyzing the fields and conditions in the expanded query statement, wherein the redundant content includes at least one of a redundant data table, a redundant field, and a redundant screening condition; and
[0071] The tailored query statement is generated by removing the redundant content irrelevant to the target indicator and retaining the fields and screening conditions of the atomic indicator, time period and modifier used to query the target indicator.
[0072] Example 4. The method according to any one of Examples 1-3, wherein determining the target atomic indicator, the target time period, and the target modifier corresponding to the target indicator comprises:
[0073] Determine the target atomic indicator for generating the target indicator by using the language model based on the query logic in the tailored query statement;
[0074] Determining the target time period associated with the target indicator based on the time filter condition in the filter condition by using the language model; and
[0075] The target modifier associated with the target indicator is determined by using the language model based on the dimension screening conditions in the screening conditions.
[0076] Example 5. The method according to any one of Examples 1-4, wherein determining the target atomic indicator for generating the target indicator comprises:
[0077] Based on the query logic, the tailored query statement and the atomic indicator recall strategy, a first prompt word is generated;
[0078] Based on the first prompt word, the target atomic index is determined using the language model.
[0079] Example 6. The method of any one of Examples 1-5, wherein determining the target time period associated with the target metric comprises:
[0080] Generate a second prompt word based on the time screening condition and the time period judgment strategy in the tailored query statement;
[0081] Based on the second prompt word, the target time period associated with the target indicator is determined using the language model.
[0082] Example 7. The method of any one of Examples 1-6, wherein determining the target modifier associated with the target metric comprises:
[0083] Generate a third prompt word based on the dimension screening condition and the dimension judgment strategy in the tailored query statement;
[0084] Based on the third prompt word, the language model is used to determine a target modifier word associated with the target indicator.
[0085] Example 8. The method according to any one of Examples 1-7, further comprising:
[0086] Based on the tailored query statement, determine additional information associated with the target indicator, the additional information including at least one of a data domain to which the target indicator belongs, a corresponding business process, a data type, an indicator unit, and a technical caliber description;
[0087] The disassembly result and the additional information are displayed.
[0088] Example 9. A device for disassembling an indicator, comprising:
[0089] A query statement acquisition module is configured to acquire an original query statement, wherein the original query statement includes a target indicator to be decomposed, and a data table in the original query statement comes from an application layer of a data warehouse;
[0090] A query statement expansion module is configured to generate an expanded query statement corresponding to the original query statement by tracing upward the original query statement, wherein the expanded query statement includes a data table from a data detail layer in the data warehouse;
[0091] A query statement clipping module is configured to generate a clipped query statement by clipping the expanded query statement, wherein the clipped query statement includes query logic and screening conditions for generating the target indicator based on the atomic indicator;
[0092] a target element determination module configured to determine, based on the tailored query statement, a target atomic indicator, a target time period, and a target modifier corresponding to the target indicator by using a language model based on the query logic and the screening condition related to the atomic indicator; and
[0093] The disassembly result determination module is configured to determine the disassembly result of the target indicator based on the target atomic indicator, the target time period and the target modifier.
[0094] Example 10. The apparatus according to Example 9, wherein the query statement expansion module comprises:
[0095] a data table determination module configured to determine the data table of the data detail layer associated with the target indicator by tracing upward the lineage relationship of the data tables in the data warehouse based on the data table in the original query statement; and
[0096] The expanded query generation module is configured to generate the expanded query statement corresponding to the original query statement by constructing a query logic including an atomic indicator for generating the target indicator based on the fields in the data table of the data detail layer.
[0097] Example 11. The apparatus according to any one of Examples 9-10, wherein the query statement tailoring module comprises:
[0098] a redundant content determination module configured to determine redundant content unrelated to the target indicator by analyzing the fields and conditions in the expanded query statement, wherein the redundant content includes at least one of a redundant data table, a redundant field, and a redundant screening condition; and
[0099] The redundant content removal module is configured to generate the tailored query statement by removing the redundant content irrelevant to the target indicator and retaining the fields and screening conditions of the atomic indicator, time period and modifier used to query the target indicator.
[0100] Example 12. The apparatus according to any one of Examples 9-11, wherein the target element determination module comprises:
[0101] an atomic indicator generation module, configured to determine the target atomic indicator for generating the target indicator based on the query logic in the tailored query statement by using the language model;
[0102] a time period generating module configured to determine the target time period associated with the target indicator based on a time filter condition in the filter conditions by using the language model; and
[0103] The modifier generating module is configured to determine the target modifier associated with the target indicator based on the dimension filtering condition in the filtering condition by using the language model.
[0104] Example 13. The apparatus according to any one of Examples 9-12, wherein the atomic indicator generation module comprises:
[0105] A first prompt generating module is configured to generate a first prompt word based on the query logic, the tailored query statement and the atomic index recall strategy;
[0106] The atomic indicator second generation module is configured to determine the target atomic indicator based on the first prompt word using the language model.
[0107] Example 14. The apparatus of any one of Examples 9-13, wherein the time period generation module comprises:
[0108] A second prompt generating module is configured to generate a second prompt word based on the time screening condition and the time period judgment strategy in the tailored query statement;
[0109] The second time period generation module is configured to determine the target time period associated with the target indicator based on the second prompt word using the language model.
[0110] Example 15. The apparatus according to any one of Examples 9-14, wherein the modifier generating module comprises:
[0111] A third prompt generating module is configured to generate a third prompt word based on the dimension screening condition and the dimension judgment strategy in the tailored query statement;
[0112] The second modifier generating module is configured to determine a target modifier associated with the target indicator based on the third prompt word and using the language model.
[0113] Example 16. The apparatus according to any one of Examples 9-15, further comprising:
[0114] An additional information generation module is configured to determine additional information associated with the target indicator based on the tailored query statement, wherein the additional information includes at least one of the data domain to which the target indicator belongs, the corresponding business process, the data type, the indicator unit, and the technical caliber description;
[0115] The disassembly result display module is configured to display the disassembly result and the additional information.
[0116] Example 17. An electronic device comprising:
[0117] Processor; and
[0118] A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising:
[0119] Example 18. The method according to Example 17, wherein generating the expanded query statement corresponding to the original query statement comprises:
[0120] Based on the data table in the original query statement, the data table of the data detail layer associated with the target indicator is determined by tracing upward the lineage relationship of the data table in the data warehouse; and
[0121] The expanded query statement corresponding to the original query statement is generated by constructing a query logic including an atomic indicator for generating the target indicator based on the fields in the data table of the data detail layer.
[0122] Example 19. The method according to any one of Examples 17-18, wherein generating the tailored query statement comprises:
[0123] Determine redundant content irrelevant to the target indicator by analyzing the fields and conditions in the expanded query statement, wherein the redundant content includes at least one of a redundant data table, a redundant field, and a redundant screening condition; and
[0124] The tailored query statement is generated by removing the redundant content irrelevant to the target indicator and retaining the fields and screening conditions of the atomic indicator, time period and modifier used to query the target indicator.
[0125] Example 20. The method of any one of Examples 17-19, wherein determining the target atomic indicator, the target time period, and the target modifier corresponding to the target indicator comprises:
[0126] Determine the target atomic indicator for generating the target indicator by using the language model based on the query logic in the tailored query statement;
[0127] Determining the target time period associated with the target indicator based on the time filter condition in the filter condition by using the language model; and
[0128] The target modifier associated with the target indicator is determined by using the language model based on the dimension screening conditions in the screening conditions.
[0129] Example 21. The method of any one of Examples 17-20, wherein determining the target atomic indicator for generating the target indicator comprises:
[0130] Based on the query logic, the tailored query statement and the atomic indicator recall strategy, a first prompt word is generated;
[0131] Based on the first prompt word, the target atomic index is determined using the language model.
[0132] Example 22. The method of any of Examples 17-21, wherein determining the target time period associated with the target metric comprises:
[0133] Generate a second prompt word based on the time screening condition and the time period judgment strategy in the tailored query statement;
[0134] Based on the second prompt word, the target time period associated with the target indicator is determined using the language model.
[0135] Example 23. The method of any of Examples 17-22, wherein determining the target modifier associated with the target metric comprises:
[0136] Generate a third prompt word based on the dimension screening condition and the dimension judgment strategy in the tailored query statement;
[0137] Based on the third prompt word, the language model is used to determine a target modifier word associated with the target indicator.
[0138] Example 24. The method according to any one of Examples 17-23, wherein the action further includes:
[0139] Based on the tailored query statement, determining additional information associated with the target indicator, the additional information including at least one of a data domain to which the target indicator belongs, a corresponding business process, a data type, an indicator unit, and a technical caliber description; and
[0140] The disassembly result and the additional information are displayed.
[0141] Example 25. A computer-readable storage medium having one or more computer instructions stored thereon, wherein the one or more computer instructions are executed by a processor to implement the method according to any one of Examples 1 to 8.
[0142] Example 26. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of Examples 1 to 8.
[0143] Although the disclosure has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Instead, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for decomposing an indicator, comprising: Obtaining an original query statement, wherein the original query statement includes a target indicator to be decomposed, and a data table in the original query statement comes from an application layer of a data warehouse; By tracing back the original query statement, an expanded query statement corresponding to the original query statement is generated, wherein the expanded query statement includes a data table from a data detail layer in the data warehouse; By tailoring the expanded query statement, a tailored query statement is generated, wherein the tailored query statement includes query logic and screening conditions for generating the target indicator based on the atomic indicator; Based on the tailored query statement, using a language model based on the query logic and the screening condition related to the atomic indicator, determine a target atomic indicator, a target time period, and a target modifier corresponding to the target indicator; as well as Based on the target atomic indicator, the target time period and the target modifier, a decomposition result of the target indicator is determined.
2. The method according to claim 1, wherein generating the expanded query statement corresponding to the original query statement comprises: Based on the data table in the original query statement, the data table of the data detail layer associated with the target indicator is determined by tracing upward the lineage relationship of the data table in the data warehouse; as well as The expanded query statement corresponding to the original query statement is generated by constructing a query logic including an atomic indicator for generating the target indicator based on the fields in the data table of the data detail layer.
3. The method according to claim 1, wherein generating the tailored query statement comprises: Determine redundant content that is unrelated to the target indicator by analyzing the fields and conditions in the expanded query statement, wherein the redundant content includes at least one of a redundant data table, a redundant field, and a redundant screening condition; as well as The tailored query statement is generated by removing the redundant content irrelevant to the target indicator and retaining the fields and screening conditions of the atomic indicator, time period and modifier used to query the target indicator.
4. The method according to claim 1, wherein determining the target atomic indicator, the target time period, and the target modifier corresponding to the target indicator comprises: Determine the target atomic indicator for generating the target indicator by using the language model based on the query logic in the tailored query statement; Determine the target time period associated with the target indicator based on the time filter condition in the filter condition by using the language model; as well as The target modifier associated with the target indicator is determined by using the language model based on the dimension screening conditions in the screening conditions.
5. The method according to claim 4, wherein determining the target atomic indicator for generating the target indicator comprises: Based on the query logic, the tailored query statement and the atomic indicator recall strategy, a first prompt word is generated; as well as Based on the first prompt word, the target atomic index is determined using the language model.
6. The method of claim 4, wherein determining the target time period associated with the target metric comprises: Based on the time screening condition and the time period judgment strategy in the tailored query statement, a second prompt word is generated; as well as Based on the second prompt word, the target time period associated with the target indicator is determined using the language model.
7. The method of claim 4, wherein determining the target qualifier associated with the target metric comprises: Generate a third prompt word based on the dimension screening condition and the dimension judgment strategy in the tailored query statement; as well as Based on the third prompt word, the language model is used to determine a target modifier word associated with the target indicator.
8. The method according to claim 1, further comprising: Based on the tailored query statement, determine additional information associated with the target indicator, the additional information including at least one of a data domain to which the target indicator belongs, a corresponding business process, a data type, an indicator unit, and a technical caliber description; as well as The disassembly result and the additional information are displayed.
9. A device for disassembling an indicator, comprising: A query statement acquisition module is configured to acquire an original query statement, wherein the original query statement includes a target indicator to be decomposed, and a data table in the original query statement comes from an application layer of a data warehouse; A query statement expansion module is configured to generate an expanded query statement corresponding to the original query statement by tracing upward the original query statement, wherein the expanded query statement includes a data table from a data detail layer in the data warehouse; A query statement clipping module is configured to generate a clipped query statement by clipping the expanded query statement, wherein the clipped query statement includes query logic and screening conditions for generating the target indicator based on the atomic indicator; a target element determination module configured to determine, based on the tailored query statement, a target atomic indicator, a target time period, and a target modifier corresponding to the target indicator by using a language model based on the query logic and the screening condition related to the atomic indicator; as well as The disassembly result determination module is configured to determine the disassembly result of the target indicator based on the target atomic indicator, the target time period and the target modifier.
10. An electronic device comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.
11. A computer program product tangibly stored on a non-transitory computer readable medium and comprising computer executable instructions for performing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data extraction method and device, equipment and storage medium
CN110928903A
Data processing method and device for data warehouse, medium and computing equipment
CN111966692A