Data provenance method and apparatus, and related device

By adding the traceability field to the result table to record the source information, the problem of difficult to trace the abnormal calculation result is solved, and the effect of quickly locate the cause of the abnormality and improve the analysis and processing efficiency is achieved.

WO2025098455A1PCT designated stage expired Publication Date: 2025-05-15HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/130628
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-09
Filing Date
2024-11-07
Publication Date
2025-05-15

AI Technical Summary

Technical Problem

When there are abnormalities in the calculation results, it is difficult to quickly trace the causes of the exception, resulting in low efficiency in data analysis and exception handling.

Method used

By adding a traceability field for traceability to the result table, recording the source information of each record, including table identification and filtering conditions, the user can generate traceability requests based on the value of the traceability field, determine the traceability statement and execute it to locate the cause of the abnormality.

Benefits of technology

It realizes the rapid positioning of the cause of the abnormality when there is an abnormality in the calculation result, and improves the efficiency of data analysis and exception processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024130628_15052025_PF_FP_ABST
    Figure CN2024130628_15052025_PF_FP_ABST
Patent Text Reader

Abstract

A data provenance method and apparatus, and a related device, relating to the field of databases. The provenance method comprises: a data provenance system acquiring a provenance request, wherein the provenance request is used for requesting to search for the cause of an anomaly occurring in a record to be traced in a result table, the provenance request comprises a provenance parameter, the result table comprises a provenance field, the filed value of the provenance field comprises one or more table identifiers and screening conditions respectively corresponding to the table identifiers, the result table is obtained on the basis of source data tables corresponding to the one or more table identifiers, and the provenance parameter comprises the field value of the provenance field corresponding to the record to be traced; determining a provenance statement on the basis of the provenance request; and executing the provenance statement to determine the cause of the anomaly corresponding to the record to be traced. By recording the provenance field in the result table, when an anomaly occurs in a calculation result involving a large number of data tables and a large number of calculation processes, the cause of the anomaly can be quickly located, thereby improving the efficiency of data analysis and anomaly processing.
Need to check novelty before this filing date? Find Prior Art

Description

Data tracing method, device and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 9, 2023, with application number 202311492215.5 and application name “A data traceability method, device and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of computer technology, and in particular to a data tracing method, device and related equipment. Background Art

[0003] The process of calculating results using data in the database usually requires the use of a large number of data tables and multiple calculation processes. A single calculation result needs to be based on hundreds of tables and go through hundreds of calculation steps. Once an abnormality occurs in the calculation result, business personnel cannot quickly trace the calculation process and can only rely on R&D personnel to analyze the code and then locate the problem.

[0004] Summary of the Invention

[0005] The present application provides a data tracing method, apparatus, and related equipment, which can quickly locate the cause of anomalies when anomalies occur in calculation results involving a large number of data tables and a large number of calculation processes, thereby improving the efficiency of data analysis and exception handling.

[0006] In the first aspect, the present application provides a data tracing method, including: obtaining a tracing request, which is used to request to find the cause of the abnormality of the record to be traced in the result table; the tracing request includes a tracing parameter, the result table includes a tracing field, and the field value of the tracing field in the result table includes one or more table identifiers and the filtering conditions corresponding to each of the one or more table identifiers. The above-mentioned result table is obtained based on the source data table corresponding to the one or more table identifiers in the tracing field, and the above-mentioned tracing parameter includes the field value of the tracing field corresponding to the record to be traced; the record to be traced is any record in the result table; determining the tracing statement according to the tracing request, and executing the tracing statement to determine the cause of the abnormality corresponding to the tracing request; wherein, the tracing statement is used to locate the original record corresponding to the record to be traced in the above-mentioned one or more source data tables, and the record to be traced is obtained based on the original record in these one or more source data tables.

[0007] In the process of obtaining a result table based on one or more source data tables, a traceability field for tracing the source is added to the result table to record the source of each record in the result table, wherein the value of the traceability field includes one or more table identifiers and the filtering conditions corresponding to each table identifier, and the one or more table identifiers indicate the one or more source data tables used to obtain the result table. When it is necessary to trace the source of a record in the result table, for example, when the user finds that a record in the result has an exception, it is only necessary to determine the corresponding traceability statement based on the value of the traceability field in the record, and execute the traceability statement to determine the original record corresponding to the record to be traced. If the record has an exception, the cause of the exception is also determined. By recording the above-mentioned traceability field in the result table, when an exception occurs in the calculation results involving a large number of data tables and a large number of calculation processes, the cause of the exception can be quickly located, thereby improving the efficiency of data analysis and exception handling.

[0008] In one possible implementation, each of the one or more table identifiers corresponds to a source data table, the filtering condition corresponding to the first table identifier is the condition for filtering the first source data table when executing the tracing statement, the first table identifier is one of the one or more table identifiers, and the identifier of the first source data table is the first table identifier.

[0009] The field value of the traceability field corresponding to each record includes one or more table identifiers. Each table identifier corresponds to a filtering condition. The filtering condition corresponding to any table identifier is used to filter the source data table corresponding to the table identifier to obtain the original record corresponding to the record to be traced.

[0010] In a possible implementation, before obtaining the traceability request, the method further includes: obtaining configuration information of the first computing process, the configuration information including input information, output information and field mapping relationship; wherein the input information includes one or more table identifiers; the output information includes the target fields included in the result table; the field mapping relationship indicates the mapping relationship between the source fields in the one or more source data tables and the corresponding destination fields in the result table; generating business logic code according to the configuration information of the first computing process; wherein the first computing process is one of the one or more computing processes included in a business; when executing the business including the first computing process, executing the business logic code corresponding to the first computing process to obtain the result table, and generating the field value of the traceability field corresponding to each record in the result table; wherein the filtering conditions corresponding to the one or more table identifiers are generated based on the configuration information.

[0011] For a given application scenario, it's often necessary to implement calculations for multiple businesses based on database tables. For example, in tax scenarios, businesses such as export tax rebates and software tax rebates all require financial data from the database. Calculations for different businesses may utilize the same data tables and calculation processes. For example, export tax rebates require export contract data, invoicing data, customs declaration data, and payment data. Software tax rebates require software contract data, invoicing data, and software product data. Both businesses require invoicing data and require the calculation process to load invoicing data. Therefore, users can first configure multiple calculation processes, completing the configuration of all the calculation processes involved in different businesses. Then, based on the needs of each business, they can configure the calculation processes included in each business, improving the configuration efficiency of different businesses.

[0012] In one possible implementation, the above-mentioned configuration information also includes a calculation process type corresponding to the first calculation process, and the calculation process type is used to indicate the parsing rules for the calculation process; the above-mentioned generation of business logic code based on the configuration information of the first calculation process includes: generating business logic code based on the configuration information of the first calculation process and the calculation process type corresponding to the first calculation process; wherein, the calculation process type includes general type and customized type; the general type includes data set type, connection type and derived type, the data set type indicates that the calculation process is used to load data or output data; the connection type indicates that the calculation process is used to process data between two or more tables; the derived type indicates that the calculation process is used to expand columns of the data table; the customized type refers to the type for the application scenario. In the tax scenario, the customized type includes conversion type, allocation type and accumulation type; the conversion type indicates that the calculation process converts the exchange rate; the allocation type indicates that the calculation process allocates the amount based on the contract product; the accumulation type indicates that the calculation process is for annual accumulation, quarterly accumulation, etc.

[0013] By configuring the calculation process type, different calculation process types correspond to preset parsing rules. After the user configures the calculation process, the calculation process is parsed according to the preset parsing rules corresponding to the calculation process type, which can improve the efficiency of parsing and the efficiency of generating the corresponding business logic code. In addition, for a specific application scenario, the parsing rules corresponding to the calculation process involved in the application scenario are designed. Business personnel only need to configure the input information, output information and calculation process type required by the calculation process. The computing device will then parse the calculation process according to the parsing rules corresponding to the calculation process type. Business personnel do not need to execute the logic internally, which can reduce the difficulty of business personnel configuration.

[0014] In one possible implementation, the above-mentioned determination of the tracing statement based on the tracing request includes: obtaining the first table identifier in the tracing request and the filtering condition corresponding to the first table identifier; determining the first tracing statement based on the first table identifier and the filtering condition corresponding to the first table identifier; wherein the first tracing statement includes the first table identifier and the filtering condition corresponding to the first table identifier; the first table identifier is used to indicate the source data table queried by the first tracing statement; the filtering condition corresponding to the first table identifier is the filtering condition corresponding to the conditional statement in the first tracing statement; each source data table in one or more source data tables corresponds to a tracing statement.

[0015] A result table is obtained based on one or more source data tables. The field value of the tracing field corresponding to a record in the result table includes one or more table identifiers and the filtering conditions corresponding to each table identifier. When determining the tracing statement based on the tracing request, a tracing statement is generated based on the filtering conditions corresponding to a table identifier to obtain the original record from the source data table corresponding to the table identifier. In this way, each source data table corresponds to a tracing statement, which can accurately determine the original record corresponding to the above-mentioned record to be traced in each source data table.

[0016] In one possible implementation, the above-mentioned execution of the tracing statement to determine the exception cause corresponding to the tracing request includes: executing the first tracing statement, loading the first source data table according to the first table identifier in the first tracing statement, and filtering the data in the first source data table according to the filtering conditions corresponding to the first table identifier, and determining the exception cause corresponding to the tracing request in the first source data table.

[0017] After determining the tracing statement according to the tracing request, execute each tracing statement, determine the original record corresponding to the record to be traced in a source data table, and determine the reason for the abnormality of the record to be traced in the result table based on the original record.

[0018] In a possible implementation, before obtaining the traceability request, the process further includes: determining whether an anomaly occurs in the data recorded in the record to be traced; obtaining the field value of the traceability field corresponding to the record to be traced; and generating a traceability request based on the field value of the traceability field corresponding to the record to be traced.

[0019] After the computing device obtains the above-mentioned result table, if it detects that a record in the result table is abnormal, or after the computing device obtains the above-mentioned result table, the user can view the result table, and the user determines that a record is abnormal during the viewing process, the user can select the record to obtain the above-mentioned record to be traced. After the computing device determines that the record to be traced is to be traced, the above-mentioned traceability request can be obtained according to the field value of the traceability field corresponding to the record to be traced in the result table.

[0020] In one possible implementation, the method further includes: obtaining a business identifier of the business to be executed, the business to be executed including one or more calculation processes; determining one or more calculation processes corresponding to the business to be executed based on the business identifier and executing them to obtain a result corresponding to the business to be executed; wherein the first calculation process is one of the one or more calculation processes included in the business to be executed.

[0021] Users can first configure multiple calculation processes, complete the configuration of the calculation processes involved in different businesses, and then configure the calculation processes included in the business according to the needs of different businesses. When the user needs to know the result corresponding to a business, he only needs to enter the business identifier of the business. The computing device can determine one or more calculation processes corresponding to the business based on the business identifier, and then execute each calculation process to obtain the result corresponding to the business.

[0022] In a possible implementation, the configuration information further includes a field screening condition, and the field screening condition is used to screen out data that meets the field screening condition from the corresponding source data table.

[0023] When configuring the first calculation process, you also need to configure the source data table's field filter conditions. These field filter conditions are used to filter data from the source data table that meets the field filter conditions. For example, if a source data table contains multiple records for the entire year, but the first calculation process only uses data from the first quarter, the field filter conditions will be used to filter the data from the source data table for the first calculation.

[0024] In a second aspect, the present application provides a data tracing device, which includes various modules for executing the data tracing method in the first aspect or any possible implementation of the first aspect.

[0025] In a third aspect, the present application provides a computing device comprising a processor and a memory, wherein the processor executes instructions stored in the memory to implement the method described in the first aspect or any possible implementation of the first aspect.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that it includes computer program instructions, which, when executed by a computing device, enable the computing device to execute the method described in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] FIG1 is a schematic diagram of an application scenario provided by the present application;

[0028] FIG2 is a schematic diagram of a metadata configuration interface provided by this application;

[0029] FIG3 is a schematic diagram of a calculation process configuration interface provided by the present application;

[0030] FIG4 is a schematic diagram of a reference relationship between calculation processes provided by the present application;

[0031] FIG5 is a schematic diagram of a computing chain configuration interface provided by the present application;

[0032] FIG6 is a flow chart of a data tracing method provided by the present application;

[0033] FIG7 is a schematic diagram of obtaining a result table based on a source data table provided by the present application;

[0034] FIG8 is a schematic diagram of another method of obtaining a result table based on a source data table provided by the present application;

[0035] FIG9 is a schematic structural diagram of a data tracing device provided by the present application;

[0036] FIG10 is a schematic diagram of a computing device provided by the present application;

[0037] FIG11 is a schematic diagram of a computing device cluster provided by the present application. DETAILED DESCRIPTION

[0038] In order to solve the problem that it is difficult to trace the cause of the calculation results obtained based on a large number of data tables when an anomaly occurs, the present application provides a data tracing method. In the process of obtaining a result table based on one or more data tables, the data tracing system adds a tracing field for tracing in the result table. The tracing field is used to record the original record corresponding to each record in the result table. When it is necessary to trace the source of a record to be traced in the result table, the data tracing system can determine the original record corresponding to the record to be traced based on the value of the tracing field in the record. By adding the above-mentioned tracing field to the result table, when tracing the calculation results involving a large number of data tables and a large number of calculation processes, the original record corresponding to a record in the calculation result can be quickly located. In the case of an anomaly in the calculation result, the cause of the anomaly can be quickly located, thereby improving the efficiency of data analysis and exception handling.

[0039] The data tracing method provided by this application is described in detail below in conjunction with the accompanying drawings provided by this application.

[0040] The data tracing method provided in this application is applied to the data tracing system 100. The data tracing system 100 can be a hardware system, a software system deployed on a hardware device, or a combination of hardware and software. When the data tracing system 100 is a software system, the data tracing system 100 can be deployed in the data center of the cloud platform. For example, the data tracing system 100 is a cloud service provided by a cloud service provider. In a specific implementation, the data tracing system 100 can be independently deployed on a computing instance in the data center of the cloud platform, or distributedly deployed on multiple computing instances in the data center of the cloud platform. Among them, computing instances include servers, virtual machines, and containers. As shown in Figure 1, the data tracing system 100 is deployed in the data center of the cloud platform and is abstracted as a cloud service by the cloud service provider. Users can log in to the cloud platform through a client or a web page, select and purchase the cloud service corresponding to the data tracing system 100 on the cloud platform. After the purchase is successful, the cloud platform provides data tracing services to users through the data tracing system 100.

[0041] The data traceability system 100 can also be deployed on a terminal device. For example, the data traceability system 100 is source code or components that can run on a terminal device, including a mobile phone, a laptop computer, a desktop computer, a tablet computer, etc.

[0042] In one possible deployment method, some functional modules in the data traceability system 100 are deployed in a back-end computing device or computing device cluster (including at least one computing device), and some functional modules are deployed in a terminal device used by a front-end user. For example, the data traceability system 100 displays a result table through the front-end. When a user needs to trace a record in a result table, the data traceability system 100 receives a record to be traced in the result table selected by the user through the front-end, and then determines the original record corresponding to the record to be traced through the back-end.

[0043] In this application, the cloud platform can be a central cloud platform, an edge cloud platform, or a cloud platform including a central cloud and an edge cloud, and this application does not specifically limit it. Moreover, when the cloud platform is a cloud platform including a central cloud and an edge cloud, the data traceability system 100 can be partially deployed on the edge cloud platform and partially deployed on the central cloud platform.

[0044] Next, based on the data tracing system 100 shown in Figure 1, the data tracing method provided by the present application will be further introduced. The data tracing method can quickly and accurately trace a record in the result table, and obtain the original record corresponding to a record in the result table in one or more data tables, wherein the result table is obtained based on one or more data tables. If the data tracing system or the user finds that there is an anomaly in a record in the result table, or the user wants to see which data in which data tables a record in the result table is based on, it is only necessary to select the record, and the data tracing system 100 can find the source data table corresponding to the result table and the original record corresponding to the record in the source data table. If the above-mentioned record to be traced is a record with an anomaly, the data tracing system 100 traces back to the original record corresponding to the record to be traced, that is, locates the cause of the anomaly in the record to be traced.

[0045] It should be understood that the data traceability performed by the data traceability system 100 is based on tracing the source of data based on the result table. The result table is the result obtained after calculation based on one or more source data tables. Before data traceability is performed, it also includes a metadata configuration process and a calculation process configuration process. Metadata configuration is to configure the source data tables and fields required for the calculation process; the calculation process configuration is to configure the input information, output information and field mapping relationship of each calculation process, etc. The source data table is processed by the calculation logic configured by the calculation process to obtain the result table. Among them, the input information includes the name or identifier of the input source data table, and the name or identifier of the source field in the source data table; the output information includes the name or identifier of the output target field, and can also include the name or identifier of the output result table; the field mapping relationship indicates the relationship between the target field in the result table and the source field in the source data table. After the user completes the metadata configuration and the calculation process configuration, the data traceability system 100 can complete the calculation according to the calculation process configured by the user and obtain the calculation result, wherein the above-mentioned result table can be the data table output by any calculation process.

[0046] Next, the configuration process of the metadata and the configuration process of the calculation process provided by this application are introduced with reference to the accompanying drawings.

[0047] Metadata configuration is used to configure the data tables and fields that need to be used in the calculation process. Figure 2 is a schematic diagram of a metadata configuration interface provided by the present application. The metadata configuration interface includes a "Synchronize Table Field" control. After detecting that the user triggers the operation of the "Synchronize Table Field" control, the data traceability system 100 displays the synchronization table field interface. For example, the data traceability system 100 displays the metadata configuration interface through the terminal device used by the user. The user clicks the "Synchronize Table Field" control with the mouse. The terminal device detects the user's triggering operation and displays the synchronization table field interface on the terminal device. The synchronization table field interface includes a "Data Table Name" input box. After the user enters or selects the data table name in the data table name input box and triggers the "Synchronize Field" control of the synchronization table field interface, the data traceability system 100 can display the field name of the data table selected by the user and related information of the field, such as field description, field type, and field length. The user can choose whether to synchronize the field through the selection box before a field name. After the user selects the fields that need to be synchronized in the synchronization table field interface, he can trigger the "Save" control of the interface to synchronize the fields. After detecting that the user triggers the "Save" space operation, the data traceability system 100 responds to the operation and synchronizes the fields selected by the user to the metadata configuration interface.

[0048] As shown in Figure 2, the metadata configuration interface has synchronized the three fields of "Company Name", "Period", and "Subject Code". The user selected the data table named 001 in the synchronization table field interface, and then selected the three fields of "Project", "Subject" and "Amount" in the data table. After the user triggers the "Save" control, the data traceability system 100 saves the operation and synchronizes the above three fields to the metadata configuration interface to realize the configuration of metadata.

[0049] Figure 3 is a schematic diagram of a calculation process configuration interface provided by the present application. As shown in the figure, the calculation process configuration interface includes a source data table input box. The user can enter the name of a source data table required for a calculation process in the source data table input box. After the data traceability system 100 receives the data table name input by the user, the data traceability system 100 obtains the name of the source field included in the source data table corresponding to the data table name, and displays the name of the source field included in this source data table at the "field mapping relationship". Among them, the source field included in the source data table is the field in the source data table selected by the user during the metadata configuration process. The user can configure the field mapping relationship between the source field in the source data table and the target field in the result table at the "field mapping relationship". If the user chooses to use a source field in the source data table in a calculation process, enter the name of the target field under the target field name corresponding to the source field, and configure the output type. The output type indicates the field mapping relationship between the source field and the target field. Output types include source field output and expression output. Source field output refers to directly using the source field in the source data table as the target field in the result table without processing the field value. Expression output refers to calculating the source field value using a configured expression and outputting it to the corresponding target field in the result table. If the user selects expression output as the output type, the user also needs to configure an expression. The input of this expression is the source field, and the output is the target field. Optionally, the above field mapping relationship also includes the data type and data length of the source field.

[0050] For example, as shown in Figure 3, the user has selected a data table named "001" as the source data table. This source data table includes five source fields: "Company ID," "Contract Number," "Time," "Amount," and "Subject." After detecting the user-entered data table name "001," the data traceability system 100 displays the names of these five source fields under "Source Field Name" in the "Field Mapping Relationship" section, allowing the user to select the source fields to be used in the calculation process. As shown in the figure, in Calculation Process 2, the user has selected four source fields: "Company ID," "Contract Number," "Time," and "Amount," and has configured the corresponding target field names and output types for each source field. For example, if the user selected Contract Number as a source field, the corresponding target field name is also Contract Number, and the output type is Source Field Output. Therefore, Calculation Process 2 includes using the field named "Contract Number" in the source data table "001" as the "Contract Number" field in the result table. For another example, let's say you select "Amount" as a source field, the corresponding target field is "Total Amount," and the output type is "Expression Output." You've configured an expression (not shown) to calculate the total amount from the amount. Therefore, Calculation Process 2 involves calculating the data in the "001" source table field named "Amount" using the configured expression, and then using that data as the data for the Total Amount field in the target table.

[0051] In one possible implementation, the calculation process configuration interface also provides a field filter condition configuration interface. Field filter condition configuration is used to configure rules for filtering fields in the source data table. For example, if the source data table includes a time field that records the time when each record in the source data table is generated, but the calculation process only requires data from the current month in the source data table, the user can configure filtering rules for the time field in the field filter condition to filter out data that meets the requirements.

[0052] In one possible implementation, when configuring a calculation process, you also need to configure the calculation process type. Calculation process types include general and custom types. General types include dataset types, connection types, and derived types. The dataset type indicates that the calculation process loads or outputs data; the connection type indicates that the calculation process is used to process data between two or more tables; and the derived type indicates that the calculation process is used to expand columns in a data table. Custom types are calculation types for specific application scenarios. For example, in tax scenarios, custom types include conversion types, allocation types, and accumulation types. The conversion type indicates that the calculation process converts exchange rates; the allocation type indicates that the calculation process allocates amounts based on contract products; for example, if a contract includes 10 products, the contract amount needs to be allocated to the 10 products; and the accumulation type indicates that the calculation process performs annual or quarterly accumulation.

[0053] The calculation process type indicates the parsing rules for the calculation process. Based on the calculation process type, the data traceability system 100 parses the calculation process configuration information and generates corresponding logic code, such as structured query language (SQL). If the calculation type is a conversion type, the data traceability system 100 generates SQL for exchange rate conversion based on the calculation process configuration information and the corresponding parsing rules for the conversion type. If the calculation type is an allocation type, the data traceability system 100 generates SQL for allocating the contract product amount based on the calculation process configuration information and the corresponding parsing rules for the conversion type.

[0054] It should be noted that there may be reference or association relationships between different calculation processes. For example, between different calculation processes with a reference relationship, the calculation result output by one calculation process is the input of another calculation process. If the input of one calculation process is the output of another calculation process, that is, there is a reference relationship between the two steps, for example, the input of calculation process 3 is the output of calculation process 1 and the output of calculation process 2, then when configuring the calculation process to be executed later, the input information also includes the calculation process name or calculation process identifier, which is used to obtain the calculation result output by the calculation process executed earlier based on the calculation process name or calculation process identifier. For example, when configuring the input information of calculation process 3, the input information includes the name of calculation process 1 and the name of calculation process 2. It should be understood that when the user configures each calculation process, the user will configure the name or identifier of each calculation process.

[0055] After completing the configuration of the calculation process, the data traceability system 100 can verify the configuration information of the calculation process to determine whether the configuration information meets the requirements. If there are errors in the configuration information, the system can prompt the user to modify it. If the configuration information meets the requirements, the data traceability system 100 can generate the logic code corresponding to the calculation process based on the configuration information.

[0056] Optionally, the data traceability system 100 can also generate a traceability statement based on the configuration information of the computing process. The relevant introduction of the traceability statement will be described in detail later and will not be described here.

[0057] In one possible implementation, as shown in FIG3 , the calculation process configuration interface can provide a “View SQL” control. After detecting that the user triggers the “View SQL” control operation, the data traceability system 100 can display the SQL statement corresponding to the current calculation process.

[0058] As shown in Figure 3, users can configure multiple calculation processes in the calculation process configuration interface. The calculation process list is displayed on the left side of Figure 3. The calculation process list is used to display the calculation processes currently configured by the user. For example, calculation processes 1 to 6 have been configured in Figure 3. The user can select a calculation process from the calculation process list on the left, for example, by clicking on the name of a calculation process with the mouse. After detecting the user's operation, the data traceability system 100 displays the configuration information of the corresponding calculation process based on the calculation process name selected by the user.

[0059] In one possible implementation, the data traceability system 100 can record reference relationships between computing processes based on their configuration information and display reference relationships between different computing processes. As shown in Figure 3, the computing process configuration interface provides a "View Reference Relationships" control. Upon detecting that a user has triggered the "View Reference Relationships" control, the data traceability system 100 displays reference relationships between the current computing process and other computing processes.

[0060] Exemplarily, if calculation process 1 and calculation process 2 are loading steps, calculation process 1 is to load this month's data, calculation process 2 is to load historical data, and calculation process 3 is the process of calculating the current cumulative data. Then calculation process 3 needs to use the output results of calculation process 1 and the output results of calculation process 2, that is, calculation process 3 has a reference relationship with calculation process 1 and calculation process 2. After the user completes the configuration of calculation process 3, the data traceability system 100 can record the above-mentioned reference relationship. After detecting that the user triggers the operation of the "View Reference Relationship" control, the data traceability system 100 displays the reference relationship between calculation process 3 and calculation process 1 and calculation process 2, as shown in Figure 4, which is a schematic diagram of a reference relationship between calculation processes provided in this application. It should be understood that if calculation process 1 and calculation process 2 are both loading data, the calculation process types of calculation process 1 and calculation process 2 are both data set types; calculation process 3 is a cumulative type.

[0061] The above-mentioned calculation process configuration interface can realize the configuration of multiple calculation processes. Each calculation process needs to use different fields in the same data table, or use different fields in different data tables. The fields of different data tables in the database and the related information of the fields are synchronized through the metadata configuration interface. When the user configures the calculation process, the data traceability system 100 can display the existing data tables in the database to the user, and after the user selects a data table, it can quickly obtain the fields of the data table and the related information of the fields, thereby improving the system's response speed and configuration efficiency, and improving user configuration efficiency.

[0062] In one possible implementation, for an application scenario, it is usually necessary to implement calculations for multiple businesses based on data tables in the database. For example, in a tax scenario, including export tax rebate business and software tax rebate business, these businesses all require financial data in the database to implement. The calculations of different businesses may use the same data tables and the same calculation processes. For example, in the export tax rebate business, export contract data, invoicing data, customs declaration data, collection data, etc. are required. In the software tax rebate business, software contract data, invoicing data, software product data, etc. are required. Both businesses need to use invoicing data and also need to load the invoicing data calculation process. Therefore, the user can first configure multiple calculation processes, complete the configuration of the calculation processes involved in different businesses, and then configure the calculation process corresponding to the business according to the needs of different businesses. For example, a user needs to perform calculations for services 1, 2, and 3. Service 1 requires calculations through process 1, 2, 3, and 4 to obtain the corresponding result. Service 2 requires calculations through process 1, 3, 5, and 6 to obtain the corresponding result. Service 3 requires calculations through process 2, 3, 5, 7, and 8 to obtain the corresponding result. Users can first configure process 1 through process 8 and then select the corresponding calculation process from the configured calculation processes based on the specific service.

[0063] In this application, the set of computing processes that implement a business calculation is called a computing chain, that is, a computing chain includes one or more computing processes, and different computing chains can include one or more identical computing processes. Figure 5 is a schematic diagram of a computing chain configuration interface provided by this application. As shown in the figure, the computing chain configuration interface includes computing chain information configuration and computing process selection. The computing chain information configuration includes configuring the computing chain identifier, computing chain name, and computing chain description, etc. Figure 5 shows three computing chains, namely, the computing chain information corresponding to three businesses, Business 1, Business 2, and Business 3. Users can configure the computing chain information corresponding to a new business by triggering the "Add" control in the computing chain information configuration. After detecting the operation of triggering the "Add" control, the data traceability system 100 adds a blank row to the computing chain list, and the user can configure the computing chain information of the newly added computing chain in the blank row. After receiving the computing chain information configured by the user, the data traceability system 100 saves the corresponding computing chain information.

[0064] The user can select a calculation chain in the calculation chain list. As shown in Figure 5, the user selects business 2, and then configures the calculation process required by the calculation chain corresponding to business 2 in the calculation process selection. As shown in Figure 5, the user triggers the "Add" control in the calculation process selection part. The data traceability system 100 responds to the trigger operation and adds a blank row to the calculation process list. The user then clicks the input box in the row. The data traceability system 100 displays the currently configured calculation processes for the user to select a calculation process. Through the above method, the user can configure multiple calculation processes included in a calculation chain, and then trigger the "Save" control below the calculation chain configuration. After detecting that the user has triggered the "Save" control, the data traceability system 100 records the configuration of the calculation chain corresponding to business 2, and thus completes the configuration of business 2.

[0065] If a user needs the calculation result of a business, the user only needs to select or enter the calculation chain identifier or calculation chain name corresponding to the business, or the business identifier or business name of the business. The data traceability system 100 can determine the corresponding calculation chain, load the SQL corresponding to the calculation process included in the calculation chain and execute it to obtain the calculation result of the business.

[0066] It should be noted that the multiple steps in a calculation chain are not executed sequentially. For example, the calculation chain corresponding to business 3 includes calculation process 2, calculation process 3, calculation process 5, calculation process 7, and calculation process 8. The process of executing this calculation chain is to first execute calculation process 2 and calculation process 3 separately; then use the calculation results of calculation process 2 and calculation process 3 as input to calculation process 5 to obtain the calculation result of calculation process 5; then use the calculation results of calculation process 5 and calculation process 7 as input to calculation process 8, execute calculation process 8, and obtain the calculation result corresponding to business 3.

[0067] After completing the above-mentioned metadata configuration, calculation process configuration and configuration of the calculation chain corresponding to different businesses, the data traceability system 100 obtains the calculation chain corresponding to each business and the calculation process included in the different calculation chains. The data traceability system 100 can implement the calculation of different businesses based on the above configuration and obtain the calculation results corresponding to each business. When the user wants to view the calculation result corresponding to a business, the data traceability system 100 executes the calculation chain corresponding to the business, that is, executes one or more calculation processes included in the calculation chain, and obtains the calculation result corresponding to the business. Among them, a calculation process can obtain one or more result tables based on one or more source data tables. When the user or the data traceability system finds that there is an anomaly in a record in the result table, or the user wants to view which data in which data tables a record in the result table is based on, the data traceability system 100 can determine the original record corresponding to the record to be traced according to the data traceability method provided by this application. A data traceability method provided by this application is introduced below in conjunction with the accompanying drawings, as shown in Figure 6. Figure 6 is a flow chart of a data traceability method provided by this application.

[0068] S601. Execute the calculation chain corresponding to the business and obtain the calculation result corresponding to the business.

[0069] When a user wants to view the calculation results corresponding to a business, the user can choose to run the business instance corresponding to the business, that is, execute the calculation chain corresponding to the business through the data traceability system 100 to obtain the calculation results corresponding to the business. For example, a user can select a business identifier on the business instance interface and choose to execute the business corresponding to the business identifier, wherein the business instance interface includes one or more businesses that have been configured with corresponding calculation chains. In this application, for each calculation process in the calculation chain, there are corresponding source data tables and result tables, and the result table is obtained based on one or more source data tables.

[0070] It should be understood that a result table can be a new table generated based on one or more source data tables, or a result table can be a table obtained by merging fields from other source data tables based on one source data table, etc. This application does not impose specific restrictions. In this application, the data traceability method provided by this application is described by taking the example of a result table being a newly generated table.

[0071] For example, as shown in Figure 7, Figure 7 is a schematic diagram of a result table obtained based on source data tables provided by this application. The source data tables are Table A and Table B. Table A includes fields such as Identity (ID), Subject, Item, and Amount, while Table B includes fields such as ID, Subject, Subject, and Amount. Using Tables A and B as the source data tables, the result table obtained after calculation is Table C shown in Figure 7.

[0072] In this application, the result table includes a traceability field. The field value of the traceability field corresponding to a record in the result table is used to indicate the original record corresponding to this record. When obtaining the result table by executing a calculation process, the data traceability system 100 can determine the value of the traceability field according to the source data table used to obtain the result table and the configuration relationship corresponding to the calculation process. Among them, the field value of the traceability field includes one or more table identifiers and the screening conditions corresponding to each table identifier; a table identifier is used to indicate a source data table, and the result table is obtained based on one or more source data tables indicated by these one or more table identifiers. Therefore, the number of table identifiers included in the field value of the traceability field is equal to the number of source data tables used to generate this result table; the screening conditions corresponding to a table identifier are used to indicate the original record of a record in the result table in the source data table represented by this table identifier.

[0073] Exemplarily, as shown in FIG. 7, Table C includes two records. Obtaining Table C from Table A and Table B is a join operation. The configuration relationship corresponding to the calculation process of obtaining Table C from Table A and Table B is: adding the amounts in the records of Table A and Table B with the same ID and subject being Subject 1. Then, the record with ID 1 in Table C is obtained by adding the amounts in the record with ID 2 in Table A and the record with ID 1 in Table B; the record with ID 2 in Table C is obtained by adding the amounts in the record with ID 4 in Table A and the record with ID 4 in Table B.

[0074] Therefore, according to the above configuration relationship, the value of the traceability field corresponding to the record with ID 1 in Table C is "A.ID:2; B.ID:1". This field includes the table identifiers of 2 source data tables, namely A and B, indicating that Table C is obtained based on Table A and Table B. The screening condition corresponding to the table identifier A is "ID:2"; indicating that the record with ID 2 in Table A is the original record corresponding to the record with ID 1 in Table C in Table A; the screening condition corresponding to the table identifier B is "ID:1"; indicating that the record with ID 1 in Table B is the original record corresponding to the record with ID 1 in Table C in Table B.

[0075] FIG. 8 is another schematic diagram of obtaining a result table based on a source data table provided by this application. Table D includes one record. The configuration relationship corresponding to the calculation process of obtaining Table D from Table A and Table B is: adding the amounts in the records of Table A and Table B with the same contract number, entity being 0024, project being D, and subject being Subject 1.

[0076] Therefore, according to the above configuration relationship, the value of the traceability field corresponding to the record in Table D is "A.a.contract = b.contract, entity: 0024, product: D; B.a.contract = b.contract, entity: 0024, subject: Subject I".

[0077] In one possible implementation, the data traceability system 100 can also obtain the traceability information corresponding to the calculation process based on the source data table and the result table. The traceability information corresponding to a calculation process includes one or more traceability records, and the number of traceability records included in the traceability information is the same as the number of source data tables used in the calculation process, that is, each source data table corresponds to a traceability record. Each traceability record includes the table identifier of the result table, the table identifier of a source data table, and a traceability statement; the traceability statement is used to determine the original record corresponding to a record in the source data table in the result table when it is executed.

[0078] For example, in the process of calculating Table C based on Table A and Table B in FIG7 , the traceability information shown in the following Table 1 can be obtained, and the traceability information includes two traceability records. Among them, the source data table item in Table 1 includes table identifier A and table identifier B, indicating that Table C is obtained based on Table A and Table B. The $id in the traceability statement in Table 1 is a parameter to be determined, which is determined by the field value of the traceability field in Table C. The traceability record with ID 1 in Table 1 is the traceability record corresponding to Table A. The traceability statement in the traceability record indicates that data that meets the ID equal to $id is filtered out from Table A, that is, when executing Select*from step.A where id=$id, one or more original records that meet the ID equal to $id value can be filtered out from Table A.

[0079] Table 1

[0080] If the process of obtaining Table D based on Table A and Table B in Figure 8 is the same, the traceability information shown in Table 2 below can be generated. This traceability information includes two traceability records. Among them, the source data table item in Table 1 includes table identifiers A and B, indicating that Table D is obtained based on Table A and Table B. The $filterCondition, $product, and $subject in the traceability statement in Table 1 are parameters to be determined, which are determined by the field values ​​of the traceability fields in the result table D. When executing the traceability statement in the record with ID 1 in Table 2, one or more original records that meet the conditions can be filtered out from Table A.

[0081] Table 2

[0082] S602: Obtain the record to be traced selected by the user, and generate a traceability request based on the record to be traced.

[0083] For any result table generated by a computation, users can view the data in the result table. For example, if a user discovers an anomaly in a record in the result table, or wants to see which data in which data tables a record is based on, the user can select the record in the result table. In this application, the selected record is referred to as the record to be traced.

[0084] After obtaining the information of the record to be traced selected by the user, the data traceability system 100 obtains the field value of the traceability field corresponding to the record to be traced in the result table according to the record to be traced, and generates a traceability request based on the field value of the traceability field corresponding to the record to be traced. Among them, the traceability request includes a traceability parameter, and the traceability parameter includes the field value of the traceability field corresponding to the record to be traced. The traceability request is used to indicate the search for the original record corresponding to the record to be traced from one or more source data tables, and the original record includes one or more records in each source data table. For example, for Table C in Figure 7, if the record to be traced is a record with ID 1 in Table C, the traceability parameter included in the traceability request is "A.ID:2; B.ID:1".

[0085] It should be understood that after the data traceability system 100 obtains the calculation results corresponding to the business, the data traceability system 100 displays the calculation results corresponding to the business to the user through the client; the traceability request is generated by the client in response to the user's operation of selecting the record to be traced in the result table, and obtaining the field value of the traceability field corresponding to the record to be traced.

[0086] S603: Determine the tracing statement corresponding to the tracing request according to the tracing request.

[0087] After receiving a traceability request, the data traceability system 100 determines the traceability statement corresponding to the traceability request based on the traceability parameters in the traceability request. In this application, the above-mentioned result table is calculated based on the data of one or more source data tables. Therefore, each traceability request corresponds to one or more traceability statements, and each source data table corresponds to a traceability statement. Each traceability statement is used to determine the original record corresponding to the record to be traced from a source data table.

[0088] In this application, the traceability statement is used to obtain the original record corresponding to the record to be traced from the source data table, that is, to filter out one or more records from the source data table. Therefore, the traceability statement can be expressed in the form of "Select*from$table where$FilterCriteria". Among them, $table represents the name or identifier of the source data table, and $FilterCriteria represents the filter condition in the conditional statement. After obtaining the traceability parameters, the data traceability system 100 generates the corresponding traceability statement based on the traceability parameters.

[0089] Exemplarily, for Table D in Figure 8, if the record to be traced is a record with ID 1 in Table D, the traceability parameters included in the traceability request are "A.ID:2; B.ID:1", and the data traceability system 100 generates corresponding traceability statements as "Select*from A where id=2" and "Select*from B where id=1".

[0090] For Table D in Figure 8, if the record to be traced is a record in Table D, the traceability parameters included in the traceability request are "A.a.contract=b.contract,entity:0024,product:D; B.a.contract=b.contract,entity:0024,subject:Ke 1". The data traceability system generates corresponding traceability statements as follows:

[0091] Select*from A,B

[0092] where a.entity=0024and

[0093] a.produce=D

[0094] a.contract=b.contract

[0095] and 0]

[0096] Select*from A,B

[0097] where b.entity=0024and

[0098] b.subject=Ke 1

[0099] a.contract=b.contract

[0100] In a possible implementation, if the data traceability system 100 generates traceability information as shown in Table 1 or Table 2 during the operation of a business instance, the above traceability request further includes the table identifier of the result table, and the table identifier of the result table is used to find the traceability record corresponding to the table identifier from the traceability information, where the traceability information includes the traceability records generated during the execution of multiple calculation processes in the operation of the business instance.

[0101] After receiving a provenance request, the data traceability system 100 determines the provenance record corresponding to the result table based on the table identifier of the result table in the provenance request. For example, the two provenance records shown in Table 1 are found through the table identifier table of Table C. Therefore, the two provenance records corresponding to the provenance request can be determined based on the provenance request. Each provenance record includes a provenance statement. For example, the provenance statement "Select * from A where ID = $id" is used to determine the original record in Table A corresponding to a record in Table C.

[0102] The traceability parameters include the field values ​​of the traceability fields corresponding to the record to be traced, which include the table identifiers of one or more source data tables and the filter conditions corresponding to each table identifier. After obtaining the traceability statement corresponding to the traceability request, the data traceability system 100 determines a traceability record based on the table identifier of a source data table in the traceability parameters and assigns values ​​to the parameters to be determined in the traceability statement in the traceability record, thereby obtaining the corresponding executable traceability statement.

[0103] For example, if the record to be traced is a record with ID 2 in Table C, then the traceability parameters include "A.ID: 4; B.ID: 4." The traceability statement corresponding to Table A is "Select * from A where ID = $id." The ID in the filter condition corresponding to Table A is assigned to the parameter $id to be determined, resulting in the executable traceability statement "Select * from A where ID = 4." The traceability statement corresponding to Table B is "Select * from B where ID = $id." The ID in the filter condition corresponding to Table A is assigned to the parameter $id to be determined, resulting in the executable traceability statement "Select * from B where ID = 4."

[0104] S604. Execute the tracing statement corresponding to the tracing request to obtain the original record corresponding to the record to be traced.

[0105] After obtaining the tracing statement corresponding to the tracing request, the data tracing system 100 executes each tracing statement to obtain a source data table and the original record corresponding to the record to be traced in the source data table.

[0106] It should be understood that if the above-mentioned record to be traced is a record with an exception selected by the user, the original record corresponding to the record to be traced can be obtained through the above method, that is, the source of the exception is located, and the user can analyze the cause of the exception in the record to be traced based on the original record.

[0107] For example, if the record to be traced is a record with ID 2 in Table C, the tracing statement corresponding to the tracing request includes the tracing statement "Select * from A where ID = 4" for Table A and the tracing statement "Select * from B where ID = 4" for Table B. Executing these two tracing statements outputs Tables A and B, and displays the record with ID 4 in Table A and the record with ID 4 in Table B separately from the other records in Tables A and B, indicating that the record with ID 4 in Table A and the record with ID 4 in Table B are the original records corresponding to the record with ID 2 in Table C to be traced.

[0108] For the above method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention. Based on the above description, those skilled in the art can think of other reasonable step combinations, which also fall within the scope of protection of the present invention.

[0109] The above text, in combination with Figures 1 to 8, describes in detail the data tracing method provided by the present application. The following text, in combination with Figures 9 to 11, describes the data tracing device, computing device and computing device cluster provided by the present application.

[0110] As shown in FIG9 , FIG9 is a structural diagram of a data tracing device provided by the present application. The data tracing device 900 includes a processing module 910 and a receiving module 920.

[0111] Receiving module 920 is used to obtain a traceability request; the traceability request is used to request a search for the cause of an anomaly in a record to be traced in the result table; the traceability request includes a traceability parameter, the result table includes a traceability field, and the field value of the traceability field in the result table includes one or more table identifiers and the filtering conditions corresponding to each of the one or more table identifiers. The result table is obtained based on the source data table corresponding to the one or more table identifiers in the traceability field. The traceability parameter includes the field value of the traceability field corresponding to the record to be traced; the record to be traced is any record in the result table. The result is obtained based on one or more source data tables. Therefore, the traceability request is also used to request a search for the original record corresponding to a record to be traced in the result table in the source data table; the original record includes one or more records in each source data table, and the record to be traced is obtained based on the original record corresponding to the record to be traced. For example, if a user discovers an anomaly in a record in the result table, or if the user wants to see which data in which data tables a record in the result table is based on, the user can select the record to be traced.

[0112] Processing module 910 is used to determine a traceability statement based on the traceability request and execute the traceability statement to determine the cause of the exception corresponding to the traceability request. The traceability statement is used to locate the original record corresponding to the record to be traced in the one or more source data tables, and the record to be traced is obtained based on the original record in the one or more source data tables. The operations performed by processing module 910 after obtaining the traceability request can be referred to the relevant operations in S603 and S604 of the method embodiment corresponding to Figure 6 above, and will not be repeated here.

[0113] The processing module 910 is further configured to implement the related operations in the above S601 to obtain a calculation result corresponding to a business.

[0114] In this application, the data tracing device 900 also includes a sending module 930 and a display module 940. After obtaining the above calculation results, the processing module 910 sends the calculation results to the display module 940 through the sending module 930 to display the calculation results to the user for viewing.

[0115] The data tracing device 900 further includes an interaction module 950 , which is configured to receive an operation of a user selecting a record to be traced in a result table, generate the above-mentioned tracing request in response to the operation, and send the request to the receiving module 920 .

[0116] The display module 940 is also used to display the configuration interface shown in Figures 2-5. The interaction module 950 is used to receive relevant configuration information entered by the user in each configuration interface, which is recorded by the processing module 910 and generates a reference relationship between the above-mentioned business logic code and the calculation process.

[0117] Optionally, the processing module 910, receiving module 920 and sending module 930 in the data tracing device 900 are deployed in a back-end computing device or computing device cluster (including at least one computing device), and the display module 940 and interaction module 950 are deployed in a terminal device used by a front-end user.

[0118] It should be understood that FIG9 is only an exemplary illustration of a division method of the data tracing device 900. In actual applications, the data tracing device 900 may also have other division methods, which are not specifically limited in this application.

[0119] This application also provides a computing device, as shown in Figure 10 , which is a schematic diagram of a computing device provided by this application. Computing device 101 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. Processor 104, memory 106, and communication interface 108 communicate with each other via bus 102. Computing device 101 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 101.

[0120] Bus 102 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG10 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 102 may include a path for transmitting information between various components of computing device 101 (e.g., memory 106, processor 104, and communication interface 108).

[0121] The processor 104 may be a central processing unit (CPU), or may include a CPU and other hardware chips. The hardware chips may be of various types. For example, the processor 104 may be a co-processing unit including a graphics processing unit (GPU), a tensor processing unit (TPU), a programmable logic device (PLD), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), or a digital signal processor (DSP). The computing device 101 may include one or more hardware chips of any of the above types, or may include multiple types of the above hardware chips. This application does not make any specific limitations.

[0122] The memory 106 may include volatile memory, such as random access memory (RAM). The memory 106 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0123] The memory 106 stores executable program code, and the processor 104 executes the executable program code to implement the method described in the method embodiment corresponding to Figure 6 and the configuration process shown in Figures 2 to 5 above. In other words, the memory 106 stores program code for implementing the functions of the data traceability system 100, thereby implementing the data traceability method shown in Figure 6 and the configuration process shown in Figures 2 to 5 above. The program code includes one or more software modules, and the one or more software modules include the processing module 910, the receiving module 920, etc. in the data traceability device 900 shown in Figure 9. The processor 104 executes the executable program code to implement the method corresponding to Figure 6 and the corresponding process of the configuration process shown in Figures 2 to 5, which will not be repeated here.

[0124] The communication interface 108 can be a wired interface or a wireless interface for communicating with other modules or devices. For example, receiving the above-mentioned traceability request, receiving the configuration information entered by the user through the configuration interface, etc. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface can be a cellular network interface or a wireless local area network interface, etc. The present application also provides a computing device cluster. The computing device cluster includes multiple computing devices 101. The computing device can be a server, such as a central server, an edge server, a local server in a local data center, or a server in a data center in a cloud environment. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0125] As shown in Figure 11, which is a schematic diagram of a computing device cluster provided by the present application, the memory 106 of multiple computing devices 101 in the computing device cluster may store the same program code for implementing the data traceability method in the embodiment shown in Figure 6 and the program code for the configuration method shown in Figures 2-5 above.

[0126] In some possible implementations, the memories 106 of the multiple computing devices 101 in the computing device cluster may also respectively store partial instructions for executing the above-mentioned method, that is, the memories 106 in different computing devices 101 in the computing device cluster may store different instructions, which are respectively used to execute partial functions of the data tracing method shown in Figure 6 and the configuration process shown in Figures 2-5. The combination of multiple computing devices 101 can jointly implement the data tracing method in the embodiment shown in Figure 6 and the configuration process shown in Figures 2-5 above.

[0127] In some possible implementations, multiple computing devices 101 in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN). For example, two computing devices 101A and 101B may be connected via a network. Specifically, each computing device may be connected to the network via a communication interface within the computing device.

[0128] This application also provides a computer program product containing instructions. The computer program product may be software or a program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device implements the program code of the data traceability method in the embodiment shown in FIG6 and the configuration process shown in FIG2-FIG5 above.

[0129] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to implement the program code of the data traceability method in the embodiment shown in FIG6 and the configuration method shown in FIG2-FIG5 above.

[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A data tracing method, characterized in that: include: Obtain a traceability request, where the traceability request is used to request to find the reason why the record to be traced in the result table is abnormal; The traceability request includes a traceability parameter, the result table includes a traceability field, the field value of the traceability field includes one or more table identifiers and the screening conditions corresponding to each of the one or more table identifiers, the result table is obtained based on the source data table corresponding to the one or more table identifiers, and the traceability parameter includes the field value of the traceability field corresponding to the record to be traced; A tracing statement is determined according to the tracing request, and the tracing statement is executed to determine the exception cause corresponding to the record to be traced; wherein the tracing statement is used to locate the original record corresponding to the record to be traced in the one or more source data tables, and the record to be traced is obtained based on the original record in the one or more source data tables.

2. The method according to claim 1, characterized in that Each table identifier among the one or more table identifiers corresponds to a source data table, the filtering condition corresponding to the first table identifier is the condition for filtering the first source data table when executing the tracing statement, the first table identifier is one of the one or more table identifiers, and the identifier of the first source data table is the first table identifier.

3. The method according to claim 2, characterized in that Before obtaining the traceability request, the following steps are also included: Acquire configuration information of the first computing process, the configuration information including input information, output information and field mapping relationship, the input information including the one or more table identifiers; the output information including the target fields included in the result table; the field mapping relationship indicates the mapping relationship between the source fields in the one or more source data tables and the corresponding target fields in the result table; Generate a business logic code according to the configuration information of the first computing process; the first computing process is one of one or more computing processes included in a business; Execute the business logic code corresponding to the first calculation process, obtain the result table, and generate the field value of the traceability field corresponding to each record in the result table; wherein the filtering conditions corresponding to the one or more table identifiers are generated based on the configuration information.

4. The method according to claim 3, characterized in that The configuration information further includes a computing process type corresponding to the first computing process, where the computing process type is used to indicate a parsing rule for the computing process; The generating of the business logic code according to the configuration information of the first computing process includes: generating the business logic code according to the configuration information of the first computing process and the computing process type corresponding to the first computing process; The computing process type includes a general type and a customized type; the general type includes a data set type, a connection type and a derived type. The data set type indicates that the computing process is used to load data or output data; the connection type indicates that the computing process is used to process data between two or more tables; the derived type indicates that the computing process is used to expand the columns of a data table; Customized type refers to the calculation type for the application scenario. In the tax scenario, customized types include conversion type, allocation type and accumulation type. The conversion type indicates that the calculation process converts the exchange rate. The allocation type indicates that the calculation process allocates the amount based on the contract product. The accumulation type indicates that the calculation process performs annual accumulation or quarterly accumulation.

5. The method according to any one of claims 2 to 4, characterized in that: The determining of the tracing statement according to the tracing request includes: Obtaining the first table identifier in the tracing request and a screening condition corresponding to the first table identifier; Determine a first tracing statement according to the first table identifier and a screening condition corresponding to the first table identifier; Among them, the first tracing statement includes the first table identifier and the filtering condition corresponding to the first table identifier; the first table identifier is used to indicate the source data table queried by the first tracing statement; the filtering condition corresponding to the first table identifier is the filtering condition corresponding to the conditional statement in the first tracing statement; each source data table in the one or more source data tables corresponds to a tracing statement.

6. The method according to claim 5, characterized in that The executing the tracing statement to determine the abnormal cause corresponding to the tracing request includes: Execute the first tracing statement, load the first source data table according to the first table identifier in the first tracing statement, and filter the data in the first source data table according to the filtering condition corresponding to the first table identifier to determine the exception cause corresponding to the tracing request in the first source data table.

7. The method according to any one of claims 1 to 6, characterized in that: Before obtaining the traceability request, the method further includes: Determining that data recorded in the record to be traced is abnormal; Obtain the field value of the traceability field corresponding to the record to be traced; The tracing request is generated according to the field value of the tracing field corresponding to the record to be traced.

8. The method according to claim 3 or 4, characterized in that: The method further comprises: Acquire a service identifier of a service to be executed, where the service to be executed includes one or more computing processes; The one or more calculation processes are determined according to the service identifier and executed to obtain a result corresponding to the service to be executed; wherein the first calculation process is one of the one or more calculation processes included in the service to be executed.

9. The method according to claim 8, characterized in that The configuration information also includes a field screening condition, and the field screening condition is used to screen out data that meets the field screening condition from the corresponding source data table.

10. A data tracing device, characterized in that: include: A receiving module, used to obtain a traceability request, wherein the traceability request is used to request to find the reason why an abnormality occurs in the record to be traced in the result table; The traceability request includes a traceability parameter, the result table includes a traceability field, the field value of the traceability field includes one or more table identifiers and the screening conditions corresponding to each of the one or more table identifiers, the result table is obtained based on the source data table corresponding to the one or more table identifiers, and the traceability parameter includes the field value of the traceability field corresponding to the record to be traced; A processing module is used to determine a tracing statement according to the tracing request, and execute the tracing statement to determine the exception cause corresponding to the record to be traced; wherein, the tracing statement is used to locate the original record corresponding to the record to be traced in the one or more source data tables, and the record to be traced is obtained based on the original record in the one or more source data tables.

11. A computing device, characterized in that, The method comprises a processor and a memory, wherein the processor executes instructions stored in the memory to implement the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data tracing method and device and related equipment

    CN119961297A

  • Data tracing method and device

    CN110019182A

  • Data query method and device

    CN113760948A

  • Data tracing method, device and equipment and computer readable storage medium

    CN114253995A

  • Data tracing method, device and system and medium

    CN115422304A

Cited By

  • Hive table repeatable and traceable data processing method and device

    CN120371818A