Contract plan tracking method, device, electronic device and computer program product
By configuring materialized views in the preset data warehouse and automatically updating contract data using tracking rules in the decision table, the problem of inefficient tracking of contract plans is solved, and efficient data query and analysis is achieved.
Patent Information
- Application Number
- CN202411929443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-01
AI Technical Summary
The prior art has inefficient problems in the tracking efficiency of contract plans, resulting in excessive burden on the primary database, low query efficiency, data processing lag, data security and consistency problems, data integration complexity, and lack of flexibility.
The decision table used to configure the materialized view is obtained through the decision model and marking layer of the preset data warehouse. The materialized view is used to obtain and store the data required for the contract plan according to the tracking rules. The tracking rules include data query rules, data analysis rules and data reporting rules.
Automatic update of materialized view is realized, which improves the tracking efficiency of contract plans, and directly querys tracking reports and required data from materialized view, solving the problem of inefficiency in the existing technology.
Smart Images

Figure CN119739796A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data, and in particular to a method, device, electronic device and computer program product for tracking a contract plan. Background Art
[0002] As the level of enterprise informatization continues to improve, contract management has become an important part of enterprise operations. With the growth of business volume and complexity, the need for real-time monitoring of contract plans has become more urgent. The main challenges are as follows:
[0003] The main database is overburdened: Traditional contract management systems often need to directly query the main database to obtain the latest data, which not only increases the burden on the main database, but may also cause performance bottlenecks and affect its stable operation.
[0004] Low query efficiency: Due to the lack of efficient query mechanism, traditional systems have low query efficiency when facing large amounts of data and cannot meet real-time requirements.
[0005] Data processing lags: Traditional data processing methods are usually batch processing, which cannot be updated in real time, resulting in the data used for decision-making not being timely enough.
[0006] Data security and consistency issues: Frequent direct access to the master database increases the risk of data leakage and inconsistency.
[0007] Complexity of data integration: Data integration between different business systems is often complex and time-consuming, which increases the difficulty of data management.
[0008] Lack of flexibility: Traditional systems are difficult to adapt to changes in business needs, and the adjustment cycle of data models is long.
[0009] Although some solutions currently on the market can alleviate the above problems to a certain extent, they generally have the following shortcomings:
[0010] Outdated technology: Most existing solutions still rely on traditional data warehouse architecture and fail to fully leverage the advantages of modern cloud-native technologies.
[0011] Poor real-time performance: The lack of effective real-time data collection and processing mechanism leads to large data delays.
[0012] System fragility: In terms of data services, there is a lack of an efficient read-write separation mechanism, which makes it difficult to meet real-time data requirements in high-concurrency scenarios.
[0013] Insufficient scalability: Traditional data warehouses are difficult to scale smoothly as business grows, resulting in performance bottlenecks.
[0014] High maintenance cost: The degree of automation is low, requiring a lot of manual intervention, which increases operation and maintenance costs.
[0015] Dynamic tracking of contract plans involves real-time monitoring and analysis of all stages of the contract life cycle from signing to execution. Traditionally, contract management relies on manual monitoring and regular reporting, which is not only inefficient but also difficult to cope with the rapidly changing business environment.
[0016] With respect to the problem of low efficiency in tracking contract plans in the above-mentioned prior art, no effective solution has been proposed yet. Summary of the invention
[0017] The embodiments of the present invention provide a method, device, electronic device and computer program product for tracking a contract plan, so as to at least solve the technical problem of low efficiency in tracking a contract plan in the prior art.
[0018] According to one aspect of an embodiment of the present invention, a method for tracking a contract plan is provided, comprising: obtaining a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking the contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules at least include: data query rules, data analysis rules, and data reporting rules; among multiple preset contract data recorded in the data detail layer of the preset data warehouse, query data required for tracking the contract plan according to the data query rules, and update the materialized view based on the query data, wherein the materialized view The contract data includes: the query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also includes: the analysis data; at the data application layer of the preset data warehouse, the query data and the analysis data recorded in the materialized view after the update are summarized according to the data reporting rules to generate a tracking report, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report.
[0019] Optionally, the method also includes: obtaining a tracking instruction for the contract plan, wherein the tracking instruction is used to instruct obtaining the tracking report: in response to the tracking instruction, detecting at the data application layer in the preset data warehouse whether the tracking report is recorded in the materialized view; if the tracking report is recorded in the materialized view, extracting the tracking report from the materialized view; if the tracking report is not recorded in the materialized view, querying the query data required to track the contract plan according to the data query rules among the multiple preset contract data recorded in the data detail layer of the preset data warehouse, and updating the materialized view based on the query data.
[0020] Optionally, the decision table is also used to configure an update period of the materialized view, wherein the update period is a preset time interval, and the method further includes: at the data detail layer of the preset data warehouse, monitoring whether the time since the last update of the materialized view has reached the update period; when the time since the last update of the materialized view has reached the update period, querying and tracking the query data required for the contract plan according to the data query rules, and updating the materialized view based on the query data.
[0021] Optionally, the method also includes: obtaining initial contract data required for tracking the contract plan; storing the initial contract data in the operational data storage layer of the preset data warehouse; performing data cleansing on the initial contract data to obtain the preset contract data; and storing the preset contract data in the data detail layer.
[0022] Optionally, obtaining the initial contract data required to track the contract plan includes: collecting historical offline data required to track the contract plan from at least one preset data source; using a distributed data integration platform to collect incremental real-time data required to track the contract plan; and determining the historical offline data and the incremental real-time data as the initial contract data.
[0023] Optionally, after collecting the historical offline data required for tracking the contract plan from at least one preset data source, the method further includes: cleaning the historical offline data collected from different preset data sources to obtain the historical offline data in a unified data format.
[0024] Optionally, the method further includes: using a primary cluster in the preset data warehouse to perform a write operation on the preset data warehouse, wherein the write operation at least includes: writing the preset contract data to the preset data warehouse, and updating the materialized view; using a backup cluster in the preset data warehouse to execute a read request on the preset data warehouse, wherein the backup cluster is different from the primary cluster, and the read request is at least used to indicate reading the contract data in the materialized view.
[0025] According to another aspect of an embodiment of the present invention, a contract plan tracking device is also provided, including: an acquisition module, used to acquire a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking the contract plan, and the materialized view is at least used to acquire and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules include at least: data query rules, data analysis rules and data reporting rules; a query module, used to query query data required for tracking the contract plan according to the data query rules among multiple preset contract data recorded in the data detail layer of the preset data warehouse, and update the materialized view based on the query data, wherein the materialized view The contract data in the materialized view includes: the query data; an analysis module, which is used to analyze the query data in the materialized view according to the data analysis rules at the data service layer of the preset data warehouse, obtain the analysis data required for tracking the contract plan, and update the materialized view again based on the analysis data, wherein the contract data in the materialized view also includes: the analysis data; a collection module, which is used to summarize the query data and the analysis data recorded in the materialized view after the update according to the data reporting rules at the data application layer in the preset data warehouse, generate a tracking report, and update the materialized view after the update based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report.
[0026] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned contract plan tracking method through the computer program.
[0027] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the steps of the above-mentioned contract plan tracking method when executed by a processor.
[0028] In an embodiment of the present invention, a decision table for configuring a materialized view is obtained through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking a contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules at least include: data query rules, data analysis rules, and data reporting rules; among multiple preset contract data recorded in the data detail layer of the preset data warehouse, query data required for tracking the contract plan is queried according to the data query rules, and the materialized view is updated based on the query data, wherein the contract data in the materialized view includes: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and based on the analysis data The materialized view is updated again, wherein the contract data in the materialized view also includes: analysis data; in the data application layer in the preset data warehouse, the query data and analysis data recorded in the materialized view after the update are summarized according to the data reporting rules, and a tracking report is generated, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report, thereby automatically updating the materialized view by utilizing the decision model and the marking layer, the data detail layer, the data service layer and the data application layer of the preset data warehouse, and then when tracking the contract plan, the tracking report and the data required for tracking can be directly queried from the materialized view, thereby achieving the technical effect of improving the tracking efficiency of the contract plan, thereby solving the technical problem of low tracking efficiency of the contract plan in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0030] Figure 1 is a flow chart of a method for tracking a contract plan according to an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of a tracking device for a contract plan according to an embodiment of the present invention;
[0032] Figure 3 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0036] OLAP (On-line Analytical Processing) is a software technology that enables analysts to observe information from all aspects quickly, consistently, and interactively in order to achieve a deep understanding of the data. OLAP helps users analyze and query data from different angles and levels through multidimensional data models and multidimensional query functions, focusing on analytical decision-making.
[0037] StarRocks is a high-performance analytical data warehouse that uses vectorization, MPP architecture, CBO, intelligent materialized views, and a columnar storage engine that can be updated in real time to achieve multi-dimensional, real-time, and highly concurrent data analysis. StarRocks supports both efficient data import from various real-time and offline data sources, and direct analysis of data in various formats on the data lake. StarRocks is compatible with the MySQL protocol and can be connected to MySQL clients and common BI tools. At the same time, StarRocks has the characteristics of horizontal expansion, high availability, high reliability, and easy operation and maintenance. It is widely used in scenarios such as real-time data warehouses, OLAP reports, and data lake analysis.
[0038] StarRocks materialized view is a special type of physical table that saves pre-calculated query results from base tables. Unlike views in traditional relational databases, materialized views not only define query logic, but also actually store query results, so that these pre-calculated data can be directly used in subsequent queries without having to execute complex calculation logic again.
[0039] SeaTunnel is a very easy-to-use, high-performance massive data integration platform that supports real-time streaming and offline batch processing. It is built on Apache Spark and Apache Flink and supports real-time synchronization and conversion of massive data.
[0040] SeaTunnel Connector is a component in Apache SeaTunnel that connects different data sources and data receivers. SeaTunnel itself is a distributed batch and stream data integration platform that can efficiently handle data extraction (Extract), transformation (Transform) and loading (Load), namely the ETL process. Connectors play a key role in this process. They are responsible for communicating with external systems so that data can be read from various source systems and written to various target systems.
[0041] The ODS (Operational Data Store) layer usually refers to the operational data storage layer. This layer is mainly used to temporarily store the original data directly extracted from various business systems. These data are usually not cleaned or converted, and remain in the most original state. The main purpose of ODS is to ensure the integrity and timeliness of the data and provide a basis for subsequent data processing.
[0042] DMN (Decision Model and Notation) layer, DMN stands for decision model and notation, and is a tool for expressing business decision logic. It organizes inputs, outputs, and rules in a table to help clarify the output or action that should be obtained under specific input conditions.
[0043] The DWD (Data Warehouse Detail) layer usually refers to the data detail layer. The data in this layer is initially cleaned and converted based on the ODS layer, some obvious erroneous data is removed, and basic data type conversion and format unification are performed, but a high granularity is still retained. The data in the DWD layer is mainly used to support data processing and analysis at higher levels.
[0044] The DWS (Data Warehouse Service) layer usually refers to the data service layer. The data in this layer is further processed on the basis of the DWD layer, and usually includes some summary and aggregation operations on the data. The data in the DWS layer is more oriented to business needs, providing a more abstract and generalized data perspective for the upper-layer data applications.
[0045] The ADS (Application Data Service) layer usually refers to the data application layer. The data in this layer is designed to meet specific application scenarios, and usually includes more complex business logic processing and data presentation for specific business needs. The data in the ADS layer is often the data form closest to business applications and can be directly used for report presentation or business decision support systems.
[0046] According to an embodiment of the present invention, an embodiment of a method for tracking a contract plan is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] Figure 1 is a flow chart of a method for tracking a contract plan according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0048] Step S102, obtaining a decision table for configuring a materialized view through a decision model and a tag layer of a preset data warehouse, wherein the decision table is used to describe a tracking rule for tracking a contract plan, and the materialized view is used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rule, and the tracking rule includes at least: a data query rule, a data analysis rule, and a data reporting rule;
[0049] Step S104, querying the query data required for tracking the contract plan according to the data query rule from the multiple preset contract data recorded in the data detail layer of the preset data warehouse, and updating the materialized view based on the query data, wherein the contract data in the materialized view includes: query data;
[0050] Step S106, in the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also includes: analysis data;
[0051] Step S108, at the data application layer in the preset data warehouse, the query data and analysis data recorded in the updated materialized view are summarized according to the data reporting rules, a tracking report is generated, and the updated materialized view is updated based on the tracking report, wherein the contract data in the materialized view also includes: a tracking report.
[0052] In an embodiment of the present invention, a decision table for configuring a materialized view is obtained through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking a contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules at least include: data query rules, data analysis rules, and data reporting rules; among multiple preset contract data recorded in the data detail layer of the preset data warehouse, query data required for tracking the contract plan is queried according to the data query rules, and the materialized view is updated based on the query data, wherein the contract data in the materialized view includes: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and based on the analysis data The materialized view is updated again, wherein the contract data in the materialized view also includes: analysis data; in the data application layer in the preset data warehouse, the query data and analysis data recorded in the materialized view after the update are summarized according to the data reporting rules, and a tracking report is generated, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report, thereby automatically updating the materialized view by utilizing the decision model and the marking layer, the data detail layer, the data service layer and the data application layer of the preset data warehouse, and then when tracking the contract plan, the tracking report and the data required for tracking can be directly queried from the materialized view, thereby achieving the technical effect of improving the tracking efficiency of the contract plan, thereby solving the technical problem of low tracking efficiency of the contract plan in the prior art.
[0053] In the above step S102, the preset data warehouse is StarRocks, which is a high-performance analytical data warehouse. The preset data warehouse uses vectorization, MPP architecture, CBO, intelligent materialized views, and real-time updateable column storage engines to achieve multi-dimensional, real-time, and high-concurrency data analysis. StarRocks supports both efficient import of data from various real-time and offline data sources, and direct analysis of data in various formats on the data lake. StarRocks is compatible with the MySQL protocol and can be connected to MySQL clients and common BI tools. At the same time, StarRocks has the characteristics of horizontal expansion, high availability, high reliability, and easy operation and maintenance. It is widely used in scenarios such as real-time data warehouses, OLAP reports, and data lake analysis.
[0054] It should be noted that the preset data warehouse StarRocks includes at least: ODS layer (i.e., operational data storage layer), DWD layer (i.e., data detail layer), DWS layer (i.e., data service layer) and ADS layer (i.e., data application layer), among which, the ODS layer is used to store original data, the DWD layer is the data after pre-processing (such as data cleaning and conversion) of the original data, and the DWS layer is the intermediate data obtained by preliminary processing using the DWD layer; the ADS layer processes the data of the DWS layer again to generate the final report for display.
[0055] In the above step S102, the preset data warehouse StarRocks also includes: a DWN layer (i.e., a decision model and marking layer), which integrates the decision model and marking with the StarRocks database. The DWN layer provides the tracking rules required for the materialized view, so that the StarRocks database can update the materialized view based on the original data of each layer according to the materialized view, and then in the process of tracking the contract plan, the most recent tracking report can be directly read from the materialized view.
[0056] In the above step S102, the contract plan needs to execute the agreement. Executing the contract plan means executing the project in accordance with the agreement. Furthermore, when the contract plan is executed, information reflecting the project can be generated, such as customer information, time information, progress, milestone achievement, overall execution efficiency, risk assessment, etc., which can be recorded as the contract data of the contract plan.
[0057] It should be noted that when tracking a contract plan, it is necessary to generate a tracking report based on the contract data of the contract plan, and the contract data required for generating the tracking report needs to be searched and calculated based on the multiple contract data generated by the contract plan. Therefore, the tracking rules can represent the contract data that needs to be searched (such as data query rules), the calculation process of the contract data (if there are data analysis rules), and the reporting process of summarizing the contract data obtained by the search or calculation into a tracking report (such as data reporting rules). The tracking rules can be configured through the decision model and the decision table of the marking layer.
[0058] In the above step S102, the decision table Decision Model and Notation specifies the decision logic in a table form, including elements such as input, output and rules. The rules in the decision table are tracking rules.
[0059] In the above step S102, the materialized view is a special type of physical table in the preset data warehouse StarRocks, which stores the pre-calculated query results (such as contract data) from the base table. Different from the view in the traditional relational database, the materialized view not only defines the query logic, but also actually stores the query results, so that these pre-calculated data can be directly used in subsequent queries without having to execute the complex calculation logic again.
[0060] In the above steps S104 to S108, the materialized view is used to obtain contract data such as query data, analysis data or tracking reports from various layers of tracking rules according to the rules in the decision table, and store the contract data in the materialized view to update the materialized view.
[0061] It should be noted that a materialized view is a physical table that can be updated regularly through Oracle's internal mechanism, including a database object of a query result, which is a local copy of remote data, or used to generate a summary table based on the sum of a data table.
[0062] It should be noted that materialized views are similar to views in that they reflect the results of a query. However, unlike views that only save SQL definitions, materialized views themselves store data and are therefore materialized views.
[0063] It should be noted that when updating the materialized view based on contract data, if the contract data does not exist in the materialized view, the contract data is directly stored in the materialized view; if the contract data exists in the materialized view, the contract data is used to replace the original contract data in the materialized view.
[0064] For example, when updating a materialized view based on query data, if the query data does not exist in the materialized view, the query data is directly entered into the materialized view; if the query data exists in the materialized view, the query data is used to replace the original query data in the materialized view.
[0065] It should be noted that the method of updating materialized views based on analytical data and tracking reports is the same as that of updating materialized views based on query data, and will not be repeated here.
[0066] It should be noted that the data service layer needs to use the data of the data detail layer, the data application layer needs to use the data of the data service layer, and each layer of the preset data warehouse will update the materialized view. Therefore, the contract data obtained by each layer can be directly obtained from the updated materialized view of the upper layer of the preset data warehouse. For example, the data service layer can directly obtain query data from the materialized view updated by the data detail layer, and the data application layer can directly obtain analysis data and query data from the materialized view updated by the data service layer.
[0067] Optionally, the contract data in the materialized view may include: query data, analysis data, and tracking reports.
[0068] As an optional embodiment, the method also includes: obtaining tracking instructions for the contract plan, wherein the tracking instructions are used to instruct the acquisition of a tracking report: in response to the tracking instructions, detecting at the data application layer in the preset data warehouse whether a tracking report is recorded in the materialized view; if the tracking report is recorded in the materialized view, extracting the tracking report from the materialized view; if the tracking report is not recorded in the materialized view, querying the query data required for tracking the contract plan according to data query rules in multiple preset contract data recorded in the data detail layer of the preset data warehouse, and updating the materialized view based on the query data.
[0069] In the above-mentioned embodiment of the present application, the instruction for tracking the contract plan can be embodied as a tracking instruction, and the response to the tracking instruction can be directly queried from the materialized view of the data application layer. Since the materialized view of the data application layer is updated based on the tracking report, the tracking report can be found in the materialized view of the data application layer; however, if the materialized view is used for the first time, the data application layer has not yet generated a tracking report, and there is no time to update the materialized view at the data application layer. Therefore, when the tracking report is not recorded in the materialized view, the tracking instruction is the trigger instruction of the materialized view, which in turn triggers each layer of the preset data warehouse to update the materialized view, and queries the tracking report based on the materialized view updated by the data application layer.
[0070] As an optional embodiment, the decision table is also used to configure the update cycle of the materialized view, wherein the update cycle is a preset time interval, and the method further includes: at the data detail layer of the preset data warehouse, monitoring whether the time since the last update of the materialized view has reached the update cycle; when the time since the last update of the materialized view has reached the update cycle, querying the query data required for tracking the contract plan according to the data query rules, and updating the materialized view based on the query data.
[0071] In the above-mentioned embodiment of the present application, the materialized view can be automatically updated according to the update cycle. Further, when the time from the last update of the materialized view reaches the update cycle, the query data required for tracking the contract plan can be queried in the data detail layer of the preset data warehouse according to the data query rules, and the materialized view can be updated based on the query data, thereby triggering the update of the materialized view.
[0072] As an optional embodiment, the method also includes: obtaining initial contract data required for tracking the contract plan; storing the initial contract data in an operational data storage layer of a preset data warehouse; performing data cleansing on the initial contract data to obtain preset contract data; and storing the preset contract data in a data detail layer.
[0073] In the above-mentioned embodiment of the present application, the operational data storage layer of the preset data warehouse is used to store the basic data of the contract plan, such as the initial contract data required to track the contract plan, and then the data detail layer of the preset data warehouse can obtain the initial contract data from the operational data storage layer for data cleaning, remove some obviously erroneous data, and obtain the preset contract data stored in the data detail layer.
[0074] As an optional embodiment, obtaining the initial contract data required for tracking the contract plan includes: collecting historical offline data required for tracking the contract plan from at least one preset data source; using a distributed data integration platform to collect incremental real-time data required for tracking the contract plan; and determining the historical offline data and the incremental real-time data as the initial contract data.
[0075] In the above-mentioned embodiment of the present application, the initial contract data stored in the operational data storage layer of the preset data warehouse includes historical offline data from multiple preset data sources, and also includes incremental real-time data collected in real time.
[0076] As an optional example, before collecting historical offline data required for tracking the contract plan from at least one preset data source, connections may be made to each preset data source according to the connection mode of each preset data source.
[0077] It should be noted that for the preset data source with JDBC (Java Database Connectivity) connection method, the preset data source includes but is not limited to: Mysql, Oracle, SapHana, etc.; an external resource definition is created for each identified preset data source, wherein the external resource definition includes database connection information, authentication mechanism, etc. According to the characteristics of the source database table (such as whether there is a primary key constraint), it is automatically decided to create a primary key table or a detail table in StarRocks. Finally, an asynchronous task is submitted to synchronize data from the external data source to the internal table of StarRocks. This process involves data extraction, conversion (such as data format conversion, data cleaning), and loading (ETL).
[0078] As an optional embodiment, after collecting historical offline data required for tracking the contract plan from at least one preset data source, the method further includes: cleaning the historical offline data collected from different preset data sources to obtain historical offline data in a unified data format.
[0079] In the above-mentioned embodiments of the present application, the historical offline data collected from different preset data sources have different data formats for recording and transmission. Therefore, before storing the historical offline data in the operation data storage layer, the historical offline data collected from the preset data sources can be cleaned to obtain the historical offline data with a unified data format, and then stored in the operation data storage layer.
[0080] As an optional embodiment, the method also includes: using a primary cluster in a preset data warehouse to perform a write operation on the preset data warehouse, wherein the write operation at least includes: writing preset contract data to the preset data warehouse, and updating a materialized view; using a backup cluster in the preset data warehouse to execute a read request on the preset data warehouse, wherein the backup cluster is different from the primary cluster, and the read request is at least used to indicate reading the contract data in the materialized view.
[0081] In the above-mentioned embodiments of the present application, in a preset data warehouse, in order to store, process and manage a large amount of data, a cluster of a group of servers or database instances that need to be pre-configured and assembled is required, and the cluster is divided into a main cluster and a backup cluster, wherein the main cluster is a server cluster in the data warehouse that mainly undertakes data storage, processing and analysis tasks, and it is usually composed of multiple servers, which work together to provide high-performance data services. In the main cluster, data is stored in a distributed manner, and parallel processing and query of data can be achieved through load balancing technology; the backup cluster is a backup of the main cluster, which is used to take over its work when the main cluster fails or is unavailable. The backup cluster usually keeps data synchronized with the main cluster to ensure seamless switching when needed. Similar to the main cluster, the backup cluster is also composed of multiple servers and has similar data processing capabilities as the main cluster. Therefore, in the present application, the backup cluster can execute read requests for the preset data warehouse, realizing read-write separation.
[0082] The present invention also provides a preferred embodiment, which provides a solution for dynamic tracking of contract plans based on a real-time data warehouse with storage and computing separation. The real-time data warehouse with storage and computing separation is a real-time data warehouse based on StarRocks. Aggregate data is pre-calculated and stored through materialized views of StarRocks, and SeaTunnel's high-throughput and low-latency data synchronization capability is used to significantly improve the speed of large-scale data processing and complex queries, enhance data security and system stability, and provide efficient data support for dynamic tracking of contract plans, meet the needs of enterprises for real-time analysis, and solve a series of problems existing in the prior art, such as high integration complexity, poor real-time performance, high maintenance cost, and low query efficiency.
[0083] It should be noted that the data warehouse system covered by this application is highly scalable and reliable, and is suitable for enterprise environments that require real-time monitoring and analysis of contract execution.
[0084] As an optional example, the real-time data warehouse based on StarRocks includes but is not limited to the following aspects:
[0085] Data collection: Use tools such as SeaTunnel to collect incremental data in real time to ensure the real-time and integrity of the data.
[0086] Data processing: Through StarRocks' asynchronous materialized view technology, we can build an efficient data processing process, reduce data redundancy, and improve query performance.
[0087] Data storage: Adopt a storage-computing separation architecture, use highly scalable and elastic distributed storage components (such as HDFS and OSS) for storage, and design a reasonable data storage architecture in StarRocks, including ODS, DM, DWD, DWS, and ADS layers to support data analysis needs at different levels.
[0088] Data service: adopts a read-write separation architecture to ensure data reading efficiency and system stability in high-concurrency scenarios.
[0089] Through the above-mentioned technical means, this application not only solves the problems existing in the traditional contract management system, but also provides real-time and efficient data support for the dynamic tracking of contract plans, greatly improving the efficiency and accuracy of contract management.
[0090] It should be noted that there was a challenge in the construction of dynamic tracking of contract plans: in order to achieve real-time query and analysis, it was necessary to directly connect to the main database. This practice not only posed a potential threat to the stability of the main database, but also often failed to achieve satisfactory query efficiency.
[0091] As an optional implementation, StarRocks, based on cloud-native architecture, is used to build a real-time data warehouse, which not only completely solves the above problems, but also significantly improves query efficiency and speed. This improvement means that there is no need to rely on direct access to the main database, thereby ensuring data security and system stability, while also greatly improving the speed and response time of data processing, ultimately providing strong data support for real-time dynamic tracking of contract plans and data analysis in the LTC field.
[0092] Figure 2 is a schematic diagram of a real-time data warehouse construction process based on dynamic tracking of a cloud-native StarRocks contract plan according to an embodiment of the present invention, such as Figure 2 As shown, the following steps are included:
[0093] Step S21: Collect historical offline data to the ODS layer corresponding to StarRocks.
[0094] Optionally, for data sources with JDBC (Java Database Connectivity) connection mode, where the data sources include but are not limited to: Mysql, Oracle, SapHana, etc.; create external resource definitions for each identified data source, where the external resource definitions include database connection information, authentication mechanism, etc. According to the characteristics of the source database table (such as whether there is a primary key constraint), automatically decide to create a primary key table or a detail table in StarRocks. Finally, submit an asynchronous task to synchronize data from the external data source to the internal table of StarRocks. This process involves data extraction, conversion (such as data format conversion, data cleaning), and loading (ETL).
[0095] For example, to collect offline data about the contract business table, you can use the following code:
[0096]
[0097]
[0098]
[0099]
[0100] The above code uses "CREATE EXTERNAL TABLE" to create an external table, where an external table is a table that points to another data source (such as another database, file system, etc.). It does not store the data itself, but provides an interface to access the data.
[0101] Optionally, multiple fields are defined in the external table, such as ID, VERSION, etc. Each field has a data type (here varchar(65533)) and an optional comment (COMMENT).
[0102] Optionally, in the above code, ENGINE=JDBC: specifies that this external table is connected to an external data source through a JDBC (Java Database Connectivity) interface; PROPERTIES provides configuration information required to connect to an external data source, such as the data source name (resource) and the actual table name (table) of the external table.
[0103] The above code uses "CREATE TABLE" to create an internal table, such as a primary key table or a detail table. The internal table is the table that actually stores data. Unlike an external table, it physically exists in the database system.
[0104] Optionally, in the internal table, the definition of the fields is similar to that of the external table, but the data types are different, such as bigint(20), decimal(22,4), etc., which are more suitable for storing and analyzing data.
[0105] Optionally, ENGINE=OLAP: specifies that this table is an online analytical processing (OLAP) table, which is usually used for data warehouses and big data analysis; PRIMARY KEY(ID): defines the primary key constraint to ensure that the ID field of each record in the table is unique; DISTRIBUTED BY HASH(ID): specifies the data distribution strategy, which is to distribute data based on the hash value of the ID field; PROPERTIES: provides some additional configurations for the table, such as the replication factor (replication_num), whether to enable data cache (datacache.enable), etc.
[0106] It should be noted that the created external table and internal table have the same table name, such as "ods_contract_contrparts", but the purpose and storage method of the external table and the internal table are different. The external table is used to access data from the external data source, while the internal table is used to store and analyze data. This design is often used in data integration and big data analysis scenarios, where the external table serves as the interface of the data source and the internal table is used for efficient data processing and query.
[0107] Step S22: Use SeaTunnel to collect incremental real-time data to the ODS layer corresponding to StarRocks.
[0108] Optionally, SeaTunnel seamlessly implements the collection of incremental real-time data. SeaTunnel not only supports CDC (Change Data Capture) technology for multiple databases, ensuring that data changes can be captured in real time, but also simplifies the real-time data collection process. Its exactly-once semantics ensures the integrity and consistency of data synchronization, effectively avoiding data duplication or loss. In addition, SeaTunnel also provides a seamless connection between offline and real-time data collection, and can automatically recover in the event of a failure, ensuring the continuity and stability of data collection.
[0109] It should be noted that CDC is a technology used to capture and track data changes in a database.
[0110] For example, to collect OracleCDC in real time, you can use the following code:
[0111]
[0112]
[0113]
[0114] The above code is a configuration snippet that is used to set the parameters of a data synchronization or data flow task. This configuration is usually used in data integration, real-time data stream processing, or ETL (Extract, Transform, Load) tools to define how data flows from the source system (in this case, Oracle database) to the target system (in this case, StarRocks database). The above configuration snippet can be divided into a general configuration part and a source configuration part.
[0115] Optionally, for the above code, in the general configuration section, parallelism = 1: set the parallelism of the task to 1, which means that the task will run in single-threaded mode; job.mode = "STREAMING": specify the task mode as streaming processing, that is, data will flow from the source system to the target system in real time; job.name = bpm2sr: specify a name for the task, here is bpm2sr; read_limit.bytes_per_second = 9000000 and read_limit.rows_per_second = 2000: set the rate limit for reading source data; checkpoint.interval = 100000 and checkpoint.timeout = 800000: set the relevant parameters of the checkpoint to ensure the reliability and fault tolerance of data flow; job.retry.times = 3 and job.retry.interval.seconds = 180: set the number of retries and retry interval after task failure.
[0116] The above code is a configuration file for a data synchronization or data migration task, which defines a data flow from an Oracle database to a StarRocks database. This configuration file uses a specific format (which may be the configuration syntax of a data synchronization tool or platform) to specify details of the source database, target database, synchronization strategy, error handling, performance tuning, and other aspects. This configuration file mainly includes the following configuration parts: overall configuration, source database configuration (Oracle-CDC), and target database configuration (StarRocks).
[0117] Optionally, in the overall configuration section, parallelism = 1: indicates that the parallelism of the specified task is 1, that is, the task runs in a single thread or process; job.mode = "STREAMING": specifies that the task mode is streaming processing, that is, continuously reading data from the source database and writing it to the target database; job.name = bpm2sr: names the task bpm2sr; read_limit.bytes_per_second = 9000000 and read_limit.rows_per_second = 2000: limit the number of bytes and rows read per second to prevent excessive pressure on the source database; checkpoint.interval = 100000 and checkpoint.timeout = 800000: set the checkpoint interval and timeout, which is a mechanism for restoring the state when the task is interrupted; job.retry.times = 3 and job.retry.interval.seconds = 180: specify the number of retries and retry interval after the task fails.
[0118] Optionally, in the Source Database Configuration (Oracle-CDC) section, base-url: indicates the JDBC connection URL of the Oracle database; username and password: are the username and password for connecting to the Oracle database; startup.mode = "latest": specifies that the task starts reading from the latest data; database-names and schema-names: specify the database name and schema name to be read; table-names: specify the table name to be read; debezium section: configures parameters related to Debezium, an open source platform for capturing database change data capture (CDC) events. The log mining strategy, batch size, sleep time, and error handling mode are configured here.
[0119] Optionally, in the target database configuration (StarRocks) section, base-url: represents the JDBC connection URL of the StarRocks database; nodeUrls: represents the list of node URLs of the StarRocks cluster; username and password: represent the username and password for connecting to StarRocks; database: specifies the name of the database to be written; table: specifies the name of the table to be written, where variable replacement (${table_name}) is used, which will be replaced with the specific table name during actual runtime; enable_upsert_delete: indicates enabling UPSERT (update or insert) and delete operations; other parameters such as max_retries, http_socket_timeout_ms, etc. are used to configure retry strategies, timeouts, etc.
[0120] In summary, this configuration file defines a data synchronization task from an Oracle database to a StarRocks database, including the connection information of the source database, the table to be synchronized, the synchronization strategy, the connection information of the target database, and the write table, etc. This task may be used in scenarios such as real-time data synchronization, data migration, or data integration.
[0121] Step S23, using asynchronous materialized views to create DMN, DWD and DWS layers in StarRocks.
[0122] Optionally, StarRocks' asynchronous materialized view technology enables efficient construction of the dimensional modeling layer (DMN, DWD, DWS) of the data warehouse. This technology optimizes query performance, reduces data redundancy, and improves the real-time and flexibility of data processing.
[0123] Optionally, the DMN layer builds a unified DMN table by integrating and standardizing multi-source system dimensional data, and regularly updates it to ensure the timeliness and accuracy of the data. At the DMN layer, by building the DMN table, key dimensional information of the contract, customer information, time information, etc. can be tracked in real time.
[0124] Optionally, the DWD layer uses materialized views to convert raw data into structured tables and perform incremental updates based on time and business events. At the DWD layer, materialized views can reflect the execution status of the contract plan in real time, including progress and milestone achievement.
[0125] Optionally, the DWS layer pre-calculates and stores aggregate indicators to support multi-dimensional analysis queries, shorten response time, improve user experience, and effectively reduce system computing pressure; at the DWS layer, through pre-calculated aggregate indicators, key business indicators such as the overall execution efficiency and risk assessment of the contract plan can be quickly obtained, thereby providing strong data support for decision-making.
[0126] In the above embodiment of the present application, in the business scenario of contract plan dynamic tracking, the application of asynchronous materialized view technology enables real-time monitoring and analysis of every link from contract plan creation to execution. The application of this technology not only improves the efficiency of contract plan management, but also provides more flexible and real-time data support for business analysis.
[0127] For example, regarding the use of asynchronous materialized views, you can use the following code:
[0128]
[0129] Step S24, creating an ADS layer in StarRocks using asynchronous materialized views.
[0130] Optionally, in the terminal analysis layer of the data warehouse, an ADS (Application Data Store) table is created through the asynchronous materialized view technology of StarRocks.
[0131] Optionally, ADS tables significantly speed up report generation and data exploration by pre-calculating and storing the results of complex queries.
[0132] Optionally, the materialized view can further aggregate and process the data in the DWS layer according to business needs, forming a data mart that can be directly used by front-end applications or data analysts. Combined with the business scenario of dynamic tracking of contract plans, the application of ADS tables can provide more efficient and flexible data analysis support for contract management.
[0133] For example, through the ADS table, you can quickly generate reports on key business indicators such as contract execution progress reports, cost analysis, and risk assessment. These reports can not only reflect the execution of contract plans in real time, but also provide decision makers with in-depth business insights, helping them to adjust strategies in a timely manner and optimize contract management processes.
[0134] In addition, ADS tables can also support data analysts to conduct more in-depth data exploration and analysis, such as discovering potential business opportunities or risk points by mining patterns and trends in contract data. This analysis capability based on real-time data provides strong data support for the dynamic tracking and management of contract plans, ensuring the accuracy and timeliness of business decisions.
[0135] Step S25, providing real-time data services for high-timeliness application scenarios.
[0136] Optionally, a read-write separation architecture is designed in StarRocks to meet the real-time data service requirements of high-timeliness application scenarios. In this architecture, the primary cluster is responsible for processing data write operations, while the standby cluster is responsible for data read requests. This separation strategy not only improves the efficiency and stability of data reading, but also effectively reduces the load of the primary cluster in data services. During the synchronization process, transaction control is adopted to synchronize data in tables to ensure the atomicity of synchronization tasks. This design ensures that synchronization tasks are either all successful or all failed, avoiding partial success and partial failure, thereby ensuring data consistency. In addition, a data service interface platform that supports high-concurrency scenarios has been developed, allowing external applications and users to query and obtain data efficiently. Combined with the business needs of dynamic tracking of contract plans, this architecture and synchronization mechanism can ensure real-time monitoring and analysis of contract plans.
[0137] For example, through real-time data services, the current status of contract execution, the completion of key milestones, and potential risk points can be quickly obtained, thus providing instant data support for contract management. This real-time data service capability is crucial for the dynamic tracking of contract plans. It not only improves the efficiency of contract management, but also enhances the real-time and accuracy of decision-making, providing a strong technical guarantee for the smooth execution of contract plans.
[0138] Optionally, in addition to using StarRocks, the data storage and computing components can also use Doris components.
[0139] Optionally, the data collection component may also use flinkcdc to replace the seatunnel component.
[0140] The above-mentioned embodiments of the present application support multiple database types (such as MySQL, Oracle, SapHana, etc.) by automatically identifying data sources and creating external resource definitions for each data source, including database connection information and authentication mechanisms; automatically decide to create a primary key table or a detail table in StarRocks according to the characteristics of the source database table (whether there is a primary key constraint) to optimize the data storage structure; use SeaTunnel to collect incremental real-time data, support CDC technology for multiple databases, ensure real-time capture of data changes, and integrity and consistency during data synchronization; use asynchronous materialized view technology in StarRocks to create DM, DWD, DWS, and ADS tables to optimize query performance, reduce data redundancy, and improve the real-time and flexibility of data processing; by designing a read-write separation architecture, the primary cluster is responsible for data writing, and the standby cluster processes data read requests, thereby improving data reading efficiency and stability; in addition, a data service interface platform that supports high-concurrency scenarios is developed to enable external applications and users to efficiently query and obtain data.
[0141] The above-mentioned embodiments of the present application utilize a storage-computing separation architecture, and computing resources support elastic scaling, automatic recovery, cost reduction and item increase, thereby solving the difficult operation and maintenance problems of traditional data platforms; combining real-time technology with data warehouse modeling theory, and using traditional offline data warehouses with high-timeliness data preprocessing calculations can accelerate data output efficiency and improve user satisfaction.
[0142] According to an embodiment of the present invention, a contract plan tracking device embodiment is also provided. It should be noted that the contract plan tracking device can be used to execute the contract plan tracking method in the embodiment of the present invention, and the contract plan tracking method in the embodiment of the present invention can be executed in the contract plan tracking device.
[0143] Figure 2 is a schematic diagram of a tracking device for a contract plan according to an embodiment of the present invention. Figure 2As shown, the device may include: an acquisition module 22, which is used to acquire a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe a tracking rule for tracking a contract plan, and the materialized view is at least used to acquire and store at least one contract data required for tracking the contract plan according to the tracking rule, and the tracking rule at least includes: a data query rule, a data analysis rule, and a data reporting rule; a query module 24, which is used to query the query data required for tracking the contract plan according to the data query rule from a plurality of preset contract data recorded in the data detail layer of the preset data warehouse, and update the materialized view based on the query data, wherein the materialized view The contract data includes: query data; an analysis module 26, which is used to analyze the query data in the materialized view according to data analysis rules at the data service layer of the preset data warehouse, obtain the analysis data required for tracking the contract plan, and update the materialized view again based on the analysis data, wherein the contract data in the materialized view also includes: analysis data; a summary module 28, which is used to summarize the query data and analysis data recorded in the materialized view after the update according to data reporting rules at the data application layer in the preset data warehouse, generate a tracking report, and update the materialized view after the update based on the tracking report, wherein the contract data in the materialized view also includes: tracking report.
[0144] It should be noted that the acquisition module 22 in this embodiment can be used to execute step S102 in the embodiment of the present application, the query module 24 in this embodiment can be used to execute step S104 in the embodiment of the present application, the analysis module 26 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the first closing module 78 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0145] In an embodiment of the present invention, a decision table for configuring a materialized view is obtained through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking a contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules at least include: data query rules, data analysis rules, and data reporting rules; among multiple preset contract data recorded in the data detail layer of the preset data warehouse, query data required for tracking the contract plan is queried according to the data query rules, and the materialized view is updated based on the query data, wherein the contract data in the materialized view includes: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and based on the analysis data The materialized view is updated again, wherein the contract data in the materialized view also includes: analysis data; in the data application layer in the preset data warehouse, the query data and analysis data recorded in the materialized view after the update are summarized according to the data reporting rules, and a tracking report is generated, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report, thereby automatically updating the materialized view by utilizing the decision model and the marking layer, the data detail layer, the data service layer and the data application layer of the preset data warehouse, and then when tracking the contract plan, the tracking report and the data required for tracking can be directly queried from the materialized view, thereby achieving the technical effect of improving the tracking efficiency of the contract plan, thereby solving the technical problem of low tracking efficiency of the contract plan in the prior art.
[0146] As an optional embodiment, the device also includes: an acquisition submodule, used to acquire tracking instructions for the contract plan, wherein the tracking instructions are used to instruct the acquisition of a tracking report; a detection submodule, used to detect whether a tracking report is recorded in a materialized view at a data application layer in a preset data warehouse in response to the tracking instructions; an extraction submodule, used to extract the tracking report from the materialized view when a tracking report is recorded in the materialized view; and a query submodule, used to query the query data required for tracking the contract plan according to data query rules in multiple preset contract data recorded in a data detail layer of the preset data warehouse when no tracking report is recorded in the materialized view, and update the materialized view based on the query data.
[0147] As an optional embodiment, the decision table is also used to configure the update cycle of the materialized view, wherein the update cycle is a preset time interval, and the device further includes: a monitoring submodule, used to monitor whether the time since the last update of the materialized view has reached the update cycle at the data detail layer of the preset data warehouse; a query submodule, used to query the query data required for tracking the contract plan according to the data query rules when the time since the last update of the materialized view has reached the update cycle, and update the materialized view based on the query data.
[0148] As an optional embodiment, the device also includes: an acquisition unit, used to acquire the initial contract data required for tracking the contract plan; a first storage unit, used to store the initial contract data in an operational data storage layer of a preset data warehouse; a data cleaning unit, used to clean the initial contract data to obtain the preset contract data; and a second storage unit, used to store the preset contract data in a data detail layer.
[0149] As an optional embodiment, the acquisition unit includes: a first acquisition subunit, used to collect historical offline data required for tracking the contract plan from at least one preset data source; a second acquisition subunit, used to collect incremental real-time data required for tracking the contract plan using a distributed data integration platform; and a determination subunit, used to determine the historical offline data and the incremental real-time data as initial contract data.
[0150] As an optional embodiment, the device also includes: a data cleaning subunit, which is used to clean the historical offline data collected from different preset data sources after collecting the historical offline data required for tracking the contract plan from at least one preset data source, so as to obtain historical offline data with a unified data format.
[0151] As an optional embodiment, the device also includes: a first execution submodule, used to use the main cluster in the preset data warehouse to perform a write operation on the preset data warehouse, wherein the write operation at least includes: writing preset contract data to the preset data warehouse, and updating the materialized view; a second execution submodule, used to use the backup cluster in the preset data warehouse to execute a read request for the preset data warehouse, wherein the backup cluster is different from the main cluster, and the read request is at least used to indicate reading the contract data in the materialized view.
[0152] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0153] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0154] In this embodiment, the computer terminal can execute the following steps of the contract plan tracking method: obtaining a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking the contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules include at least: data query rules, data analysis rules, and data reporting rules; among multiple preset contract data recorded in the data detail layer of the preset data warehouse, querying the query data required for tracking the contract plan according to the data query rules, and updating the query data based on the query data. Materialized view, wherein the contract data in the materialized view includes: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also includes: analysis data; at the data application layer in the preset data warehouse, the query data and analysis data recorded in the materialized view after the update are summarized according to the data reporting rules to generate a tracking report, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: tracking report.
[0155] Figure 3 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 3 As shown, the computer terminal 30 may include: one or more (only one is shown in the figure) processors 32 , and a memory 34 .
[0156] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the contract plan tracking method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned contract plan tracking method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the terminal 30 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: obtain a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe a tracking rule for tracking a contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rule, and the tracking rule includes at least: a data query rule, a data analysis rule, and a data reporting rule; query the query data required for tracking the contract plan according to the data query rule among multiple preset contract data recorded in the data detail layer of the preset data warehouse, and update the materialized view based on the query data; The materialized view comprises: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also comprises: analysis data; at the data application layer in the preset data warehouse, the query data and analysis data recorded in the updated materialized view are summarized according to the data reporting rules to generate a tracking report, and the updated materialized view is updated based on the tracking report, wherein the contract data in the materialized view also comprises: tracking report.
[0158] Optionally, the processor may also execute program code for the following steps: obtaining tracking instructions for a contract plan, wherein the tracking instructions are used to instruct obtaining a tracking report: in response to the tracking instructions, detecting at a data application layer in a preset data warehouse whether a tracking report is recorded in a materialized view; if a tracking report is recorded in the materialized view, extracting the tracking report from the materialized view; if no tracking report is recorded in the materialized view, querying the query data required for tracking the contract plan in accordance with data query rules from a plurality of preset contract data recorded in a data detail layer of the preset data warehouse, and updating the materialized view based on the query data.
[0159] Optionally, the decision table is also used to configure the update cycle of the materialized view, wherein the update cycle is a preset time interval, and the above-mentioned processor may also execute the program code of the following steps: at the data detail layer of the preset data warehouse, monitoring whether the time since the last update of the materialized view has reached the update cycle; when the time since the last update of the materialized view has reached the update cycle, querying the query data required for tracking the contract plan according to the data query rules, and updating the materialized view based on the query data.
[0160] Optionally, the processor may also execute the program code of the following steps: obtaining the initial contract data required for tracking the contract plan; storing the initial contract data in the operational data storage layer of the preset data warehouse; performing data cleansing on the initial contract data to obtain preset contract data; and storing the preset contract data in the data detail layer.
[0161] Optionally, the processor may also execute program code for the following steps: collecting historical offline data required for tracking contract plans from at least one preset data source; collecting incremental real-time data required for tracking contract plans using a distributed data integration platform; and determining the historical offline data and incremental real-time data as initial contract data.
[0162] Optionally, the processor may also execute program code of the following steps: performing data cleaning on historical offline data collected from different preset data sources to obtain historical offline data in a unified data format.
[0163] Optionally, the processor may also execute program code of the following steps: using a primary cluster in a preset data warehouse to perform a write operation on the preset data warehouse, wherein the write operation at least includes: writing preset contract data to the preset data warehouse, and updating a materialized view; using a backup cluster in the preset data warehouse to execute a read request on the preset data warehouse, wherein the backup cluster is different from the primary cluster, and the read request is at least used to indicate reading the contract data in the materialized view.
[0164] It can be understood by those skilled in the art that Figure 3 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 3 The structure of the electronic device is not limited. For example, the computer terminal 30 may also include Figure 3 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 3 Different configurations are shown.
[0165] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0166] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the contract plan tracking method provided in the above embodiment.
[0167] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0168] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: obtaining a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe tracking rules for tracking a contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rules, and the tracking rules include at least: data query rules, data analysis rules, and data reporting rules; querying query data required for tracking the contract plan according to the data query rules among multiple preset contract data recorded in the data detail layer of the preset data warehouse, and updating the materialized view based on the query data. A new materialized view, wherein the contract data in the materialized view includes: query data; at the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rules to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also includes: analysis data; at the data application layer in the preset data warehouse, the query data and analysis data recorded in the materialized view after the update are summarized according to the data reporting rules to generate a tracking report, and the materialized view after the update is updated again is updated based on the tracking report, wherein the contract data in the materialized view also includes: tracking report.
[0169] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining tracking instructions for a contract plan, wherein the tracking instructions are used to instruct obtaining a tracking report: in response to the tracking instructions, detecting at a data application layer in a preset data warehouse whether a tracking report is recorded in a materialized view; in a case where a tracking report is recorded in the materialized view, extracting the tracking report from the materialized view; in a case where a tracking report is not recorded in the materialized view, querying query data required for tracking the contract plan according to data query rules in multiple preset contract data recorded in a data detail layer of the preset data warehouse, and updating the materialized view based on the query data.
[0170] Optionally, in this embodiment, the decision table is also used to configure the update cycle of the materialized view, wherein the update cycle is a preset time interval, and the non-volatile storage medium is configured to store program code for executing the following steps: at the data detail layer of the preset data warehouse, monitoring whether the time since the last update of the materialized view has reached the update cycle; when the time since the last update of the materialized view has reached the update cycle, querying the query data required to track the contract plan according to the data query rules, and updating the materialized view based on the query data.
[0171] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining initial contract data required for tracking the contract plan; storing the initial contract data in an operational data storage layer of a preset data warehouse; performing data cleansing on the initial contract data to obtain preset contract data; and storing the preset contract data in a data detail layer.
[0172] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: collecting historical offline data required for tracking contract plans from at least one preset data source; using a distributed data integration platform to collect incremental real-time data required for tracking contract plans; and determining the historical offline data and incremental real-time data as initial contract data.
[0173] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: performing data cleaning on historical offline data collected from different preset data sources to obtain historical offline data with a unified data format.
[0174] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: using a primary cluster in a preset data warehouse to perform a write operation on the preset data warehouse, wherein the write operation at least includes: writing preset contract data to the preset data warehouse, and updating a materialized view; using a backup cluster in the preset data warehouse to execute a read request on the preset data warehouse, wherein the backup cluster is different from the primary cluster, and the read request is at least used to indicate reading the contract data in the materialized view.
[0175] The embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the contract plan tracking method provided in the above embodiment are implemented.
[0176] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0177] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0180] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0182] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for tracking a contract plan, characterized in that: include: By presetting the decision model and the marking layer of the data warehouse, a decision table for configuring the materialized view is obtained, wherein the decision table is used to describe a tracking rule for tracking the contract plan, and the materialized view is at least used to obtain and store at least one contract data required for tracking the contract plan according to the tracking rule, and the tracking rule at least includes: a data query rule, a data analysis rule, and a data reporting rule; Among the plurality of preset contract data recorded in the data detail layer of the preset data warehouse, query data required for tracking the contract plan according to the data query rule, and update the materialized view based on the query data, wherein the contract data in the materialized view includes: the query data; At the data service layer of the preset data warehouse, the query data in the materialized view is analyzed according to the data analysis rule to obtain the analysis data required for tracking the contract plan, and the materialized view is updated again based on the analysis data, wherein the contract data in the materialized view also includes: the analysis data; At the data application layer in the preset data warehouse, the query data and the analysis data recorded in the materialized view after the re-update are summarized according to the data reporting rule, a tracking report is generated, and the materialized view after the re-update is updated based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a tracking instruction for the contract plan, wherein the tracking instruction is used to instruct obtaining the tracking report: In response to the tracking instruction, the data application layer in the preset data warehouse detects whether the tracking report is recorded in the materialized view; In a case where the tracking report is recorded in the materialized view, extracting the tracking report from the materialized view; In the case that the tracking report is not recorded in the materialized view, query data required for tracking the contract plan is queried according to the data query rules from the multiple preset contract data recorded in the data detail layer of the preset data warehouse, and the materialized view is updated based on the query data.
3. The method according to claim 1, characterized in that The decision table is also used to configure an update period of the materialized view, wherein the update period is a preset time interval. The method further includes: At the data detail layer of the preset data warehouse, monitoring whether the time from the last update of the materialized view reaches the update period; When the time from the last update of the materialized view reaches the update period, query data required for tracking the contract plan is queried according to the data query rule, and the materialized view is updated based on the query data.
4. The method according to claim 1, characterized in that: The method further comprises: obtaining initial contract data required to track said contract schedule; Storing the initial contract data in the operational data storage layer of the preset data warehouse; Performing data cleaning on the initial contract data to obtain the preset contract data; The preset contract data is stored in the data detail layer.
5. The method according to claim 4, characterized in that Acquiring the initial contract data required to track the contract plan includes: Collecting historical offline data required for tracking the contract plan from at least one preset data source; Leverage a distributed data integration platform to collect incremental real-time data needed to track contract plans; The historical offline data and the incremental real-time data are determined as the initial contract data.
6. The method according to claim 5, characterized in that After collecting historical offline data required for tracking the contract plan from at least one preset data source, the method further includes: The historical offline data collected from different preset data sources are cleaned to obtain the historical offline data in a unified data format.
7. The method according to claim 1, characterized in that The method further comprises: Using the main cluster in the preset data warehouse, executing a write operation on the preset data warehouse, wherein the write operation at least includes: writing the preset contract data to the preset data warehouse, and updating the materialized view; A read request for the preset data warehouse is executed using a standby cluster in the preset data warehouse, wherein the standby cluster is different from the primary cluster, and the read request is at least used to instruct to read the contract data in the materialized view.
8. A tracking device for a contract plan, characterized in that: include: An acquisition module is used to acquire a decision table for configuring a materialized view through a decision model and a marking layer of a preset data warehouse, wherein the decision table is used to describe a tracking rule for tracking a contract plan, and the materialized view is used to acquire and store at least one contract data required for tracking the contract plan according to the tracking rule, and the tracking rule includes at least: a data query rule, a data analysis rule, and a data reporting rule; A query module, configured to query and track the query data required for the contract plan according to the data query rule among the plurality of preset contract data recorded in the data detail layer of the preset data warehouse, and update the materialized view based on the query data, wherein the contract data in the materialized view includes: the query data; an analysis module, configured to analyze the query data in the materialized view according to the data analysis rule at the data service layer of the preset data warehouse, obtain the analysis data required for tracking the contract plan, and update the materialized view again based on the analysis data, wherein the contract data in the materialized view also includes: the analysis data; A summary module is used to summarize the query data and the analysis data recorded in the materialized view after the re-update according to the data reporting rule at the data application layer in the preset data warehouse, generate a tracking report, and update the materialized view after the re-update based on the tracking report, wherein the contract data in the materialized view also includes: the tracking report.
9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the contract plan tracking method according to any one of claims 1 to 7 through the computer program.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the contract plan tracking method described in any one of claims 1 to 7 are implemented.