Data tracing method and device and related equipment

By adding traceability fields to the result table and recording the source information of each record, the problem of difficult to trace the calculation result in the database is solved, and the cause of abnormality is quickly located, and the efficiency of data analysis and exception processing is improved.

CN119961297APending Publication Date: 2025-05-09HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311492215.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-09
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

When there are abnormalities in the calculation results obtained by computing through a large number of data tables in the database, it is difficult for business personnel to quickly trace the calculation process and usually rely on R&D personnel to analyze the code to locate the problem.

Method used

Add a traceability field for traceability to the result table to record the source information of each record, including table identification and filtering criteria. Through this traceability field, the original record of the abnormal record can be quickly located, and the cause of the abnormality can be determined.

Benefits of technology

Through the use of traceability fields, the cause of the abnormality can be quickly located when there are abnormalities in the calculation results, the efficiency of data analysis and abnormal processing can be improved, and the dependence on R&D personnel can be reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961297A_ABST
    Figure CN119961297A_ABST
Patent Text Reader

Abstract

A data traceability method, apparatus and related device, relating to the database field, the traceability method comprising: a data traceability system obtaining a traceability request, the traceability request being used for requesting to search for a reason for an abnormality of a to-be-traced record in a result table; the traceability request comprises a traceability parameter, the result table comprises a traceability field, a field value of the traceability field comprises one or more table identifiers and a screening condition corresponding to each table identifier, and the result table is obtained based on a source data table corresponding to the one or more table identifiers; the traceability parameter comprises a field value of a traceability field corresponding to the to-be-traced record; the data traceability request determines a traceability statement according to the traceability request, and executes the traceability statement to determine an abnormal reason corresponding to the to-be-traced record. By recording the traceability field in the result table, when the calculation results related to a large number of data tables and a large number of calculation processes are abnormal, the cause of abnormality can be quickly positioned, and the efficiency of data analysis and abnormality processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of databases, and in particular to a data tracing method, device and related equipment. Background Art

[0002] In the process of calculating the results through the data in the database, a large number of data tables and multiple calculation processes are usually required. One calculation result needs to be based on hundreds of tables and hundreds of steps of calculation. Once the calculation result is abnormal, the 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. Summary of the invention

[0003] The present application provides a data tracing method, apparatus and related equipment, which can quickly locate the cause of the anomaly 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.

[0004] In a first aspect, the present application provides a data tracing method, comprising: obtaining a tracing request, the tracing request being used to request a search for the cause of an abnormality in a record to be traced in a result table; the tracing request comprising a tracing parameter, the result table comprising a tracing field, the field value of the tracing field in the result table comprising one or more table identifiers and filtering conditions corresponding to each of the one or more table identifiers, the result table being obtained based on a source data table corresponding to one or more table identifiers in the tracing field, the tracing parameter comprising a field value of a tracing field corresponding to the record to be traced; the record to be traced is any record in the result table; determining a 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 one or more source data tables, the record to be traced being obtained based on the original record in the one or more source data tables.

[0005] In the process of obtaining a result table based on one or more source data tables, a traceability field for tracing 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 screening 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 is abnormal, 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 is abnormal, the cause of the abnormality is determined. By recording the above-mentioned traceability field in the result table, when an abnormality occurs in the calculation results involving a large number of data tables and a large number of calculation processes, the cause of the abnormality can be quickly located, thereby improving the efficiency of data analysis and exception handling.

[0006] In a 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.

[0007] 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, and 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.

[0008] In a possible implementation, before obtaining the traceability request, it also includes: obtaining configuration information of the first calculation 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 calculation process; wherein the first calculation process is one of the one or more calculation processes included in a business; when executing the above-mentioned business including the first calculation process, executing the business logic code corresponding to the first calculation 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.

[0009] For an application scenario, it is usually necessary to implement calculations for multiple businesses based on the data tables in the database. For example, in the tax scenario, including export tax rebates and software tax rebates, 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 process. 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 calculation process of invoicing data. Therefore, 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, which can improve the configuration efficiency of different businesses.

[0010] In a possible implementation, the 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 generating business logic code according to the configuration information of the first calculation process includes: generating business logic code according to 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 a general type and a customized type; the general type includes a data set type, a connection type and a derived type, and 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 the columns of the data table; the customized type refers to the type for the application scenario, and in the tax scenario, the customized types include a conversion type, an allocation type and an 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.

[0011] 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 parsing efficiency and the efficiency of generating the corresponding business logic code. In addition, for a certain application scenario, the parsing rules corresponding to the calculation process involved in the application scenario are designed. The business personnel only need to configure the input information, output information and calculation process type required for the calculation process, and the computing device can parse the calculation process according to the parsing rules corresponding to the calculation process type. The business personnel do not need to execute the logic internally, which can reduce the difficulty of business personnel configuration.

[0012] In a possible implementation, the above-mentioned determining the traceability statement according to the traceability request includes: obtaining the first table identifier in the traceability request and the filtering condition corresponding to the first table identifier; determining the first traceability statement according to the first table identifier and the filtering condition corresponding to the first table identifier; wherein the first traceability 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 traceability statement; the filtering condition corresponding to the first table identifier is the filtering condition corresponding to the conditional statement in the first traceability statement; each source data table in one or more source data tables corresponds to a traceability statement.

[0013] A result table is obtained based on one or more source data tables. The field value of the traceability 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 traceability statement according to the traceability request, a traceability 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 traceability statement, which can accurately determine the original record corresponding to the above-mentioned record to be traced in each source data table.

[0014] In a possible implementation, the above-mentioned execution of the tracing statement to determine the exception cause corresponding to the tracing request includes: executing a 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 condition corresponding to the first table identifier, and determining the exception cause corresponding to the tracing request in the first source data table.

[0015] 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.

[0016] In a possible implementation, before obtaining the traceability request, the process further includes: determining whether an abnormality 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 according to the field value of the traceability field corresponding to the record to be traced.

[0017] 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, 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.

[0018] In a 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 according to 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.

[0019] The user 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.

[0020] 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.

[0021] When configuring the configuration information of the first calculation process, you also need to configure the field filter condition of the source data table, which is used to filter out data that meets the field filter condition from the source data table. For example, for a source data table, the source data table includes multiple records for the whole year, but the first calculation process only needs to use the data of the first quarter, then the field filter condition is used to filter out the data for the first calculation from the source data table.

[0022] 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.

[0023] 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 a method as described in the first aspect or any possible implementation of the first aspect.

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

[0025] Figure 1 It is a schematic diagram of an application scenario provided by this application;

[0026] Figure 2 is a schematic diagram of a metadata configuration interface provided by this application;

[0027] Figure 3 It is a schematic diagram of a calculation process configuration interface provided by the present application;

[0028] Figure 4 It is a schematic diagram of the reference relationship between the calculation processes provided by the present application;

[0029] Figure 5 It is a schematic diagram of a computing chain configuration interface provided by this application;

[0030] Figure 6 It is a flowchart of a data tracing method provided by this application;

[0031] Figure 7 It is a schematic diagram of obtaining a result table based on a source data table provided by the present application;

[0032] Figure 8 It is another schematic diagram of obtaining a result table based on a source data table provided by the present application;

[0033] Fig. 9 It is a structural schematic diagram of a data tracing device provided by this application;

[0034] Fig.10 is a schematic diagram of a computing device provided by the present application;

[0035] Fig.11 It is a schematic diagram of a computing device cluster provided by this application. DETAILED DESCRIPTION

[0036] 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 abnormality 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 abnormality in the calculation result, the cause of the abnormality can be quickly located, thereby improving the efficiency of data analysis and exception handling.

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

[0038] 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, or a software system deployed on a hardware device, or can be implemented by 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, containers, etc. Figure 1 As shown, the data traceability 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 web page, select and purchase the cloud service corresponding to the data traceability system 100 on the cloud platform, and after the purchase is successful, the cloud platform provides data traceability services to users through the data traceability system 100.

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

[0040] In a possible deployment mode, some functional modules in the data tracing system 100 are deployed in a computing device or computing device cluster (including at least one computing device) at the back end, and some functional modules are deployed in a terminal device used by a front end user. For example, the data tracing system 100 displays a result table through the front end. When a user needs to trace a record in a result table, the data tracing 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.

[0041] In this application, the cloud platform can be a cloud platform of a central cloud, a cloud platform of an edge cloud, or a cloud platform including a central cloud and an edge cloud, and this application does not specifically limit it. In addition, 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 cloud platform of the edge cloud and partially deployed on the cloud platform of the central cloud.

[0042] Next, based on Figure 1The data tracing system 100 shown continues to introduce the data tracing method provided by the present application, which 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 a record in the result table is abnormal, 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 abnormality, 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 abnormality of the record to be traced.

[0043] It should be understood that the data tracing system 100 performs data tracing based on the result table to trace the source of data. The result table is the result obtained after calculation based on one or more source data tables. Before data tracing is performed, it also includes metadata configuration process and calculation process configuration process. Metadata configuration is to configure the source data table 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 tracing 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.

[0044] Next, the configuration process of the metadata and the configuration process of the calculation process provided by the present application are introduced in conjunction with the accompanying drawings.

[0045] Metadata configuration is used to configure the data tables and fields required in the calculation process. Figure 2It 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 the data traceability system 100 detects that the user triggers the operation of the "Synchronize Table Field" control, it displays the synchronized 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 synchronized table field interface on the terminal device. The synchronized 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 synchronized table field interface, the data traceability system 100 can display the field name of the data table selected by the user and the 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 to be synchronized in the synchronization table field interface, the "Save" control of the interface can be triggered 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.

[0046] like Figure 2 As shown, the metadata configuration interface has synchronized the three fields of "Company Name", "Period" and "Subject Code". The user selected a data table named 001 in the synchronization table field interface, and then selected 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 implement the metadata configuration.

[0047] Figure 3It 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 entered 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 the 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. Among them, the output type is used to indicate the field mapping relationship between the source field and the target field. The output types include source field output and expression output. Source field output means that the field value of the source field in the source data table is not processed, and the source field in the source data table is directly used as the target field in the result table. Expression output means that the value of the source field is calculated by the configured expression and then output to the corresponding target field in the result table. If the user chooses the output type to be expression output, the user also needs to configure an expression. The input of the expression is the source field, and the output is the target field. Optionally, the above field mapping relationship also includes the data type of the source field, the data length of the source field, etc.

[0048] For example, Figure 3As shown, the user selected a data table named "001" as the source data table, which includes five source fields, namely "Company ID", "Contract Number", "Time", "Amount" and "Subject". After detecting the data table name "001" input by the user, the data traceability system 100 displays the names of the above five source fields under "Source Field Name" in the "Field Mapping Relationship" section, and the user can select the source field to be used in the calculation process; as shown in the figure, the user selected four source fields, namely "Company ID", "Contract Number", "Time" and "Amount" in calculation process 2, and configured the names of the target fields corresponding to each source field and the output type respectively. For example, the user selected the contract number as a source field, the corresponding target field name is also the contract number, and the output type is the 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, the user selected the amount as a source field, the corresponding target field name is the total amount, the output type is the expression output, and the expression for calculating the total amount from the amount is configured in the expression (not shown in the figure). Therefore, calculation process 2 includes using the data in the field named "001" in the source data table, which is the amount field, to be calculated using the configured expression and used as the data in the total amount field in the target table.

[0049] In a possible implementation, the calculation process configuration interface also provides a field filter condition configuration, which is used to configure rules for filtering fields in the source data table. For example, the source data table includes a time field, which records the time when each record in the source data table is generated, but in the calculation process, only the data of the current month in the source data table needs to be used. In this case, the user can configure the filtering rules for the time field in the field filter condition to filter out data that meets the requirements.

[0050] In a possible implementation, when configuring the calculation process, you also need to configure the calculation process type, which includes general type and customized type. Among them, the general type includes data set type, connection type and derived type, etc. The data set type indicates that the calculation process is 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 the columns of the data table. Customized type refers to the calculation type for specific application scenarios. For example, in the tax scenario, customized types include conversion type, allocation type and accumulation type. Conversion type indicates that the calculation process is to convert the exchange rate; allocation type indicates that the calculation process is to allocate the amount based on the contract product; for example, a contract includes 10 products, and the contract amount needs to be allocated to the 10 products; accumulation type indicates that the calculation process is to perform annual accumulation, quarterly accumulation, etc.

[0051] The calculation process type is used to indicate the parsing rules for the calculation process. The data traceability system 100 parses the configuration information of the calculation process based on the calculation process type 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 configuration information of the calculation process and the parsing rules corresponding to the conversion type; if the calculation type is an allocation type, the data traceability system 100 generates SQL for contract product amount allocation based on the configuration information of the calculation process and the parsing rules corresponding to the conversion type.

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

[0053] 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 is an error 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.

[0054] Optionally, the data traceability system 100 can also generate a traceability statement according to 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.

[0055] In one possible implementation, Figure 3 As shown, the calculation process configuration interface can provide a "View SQL" control. After detecting that the user triggers the operation of the "View SQL" control, the data traceability system 100 can display the SQL statement corresponding to the current calculation process.

[0056] like Figure 3 As shown, the user can configure multiple calculation processes in the calculation process configuration interface. Figure 3The left side shows the calculation process list, which is used to display the calculation process that the user has currently configured, such as Figure 3 Calculation process 1 to calculation process 6 have been configured. The user can select a calculation process from the calculation process list on the left, for example, by clicking 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 according to the calculation process name selected by the user.

[0057] In a possible implementation, the data traceability system 100 can record the reference relationship between computing processes according to the configuration information of the computing processes, and can display the reference relationship between different computing processes. Figure 3 As shown, the calculation process configuration interface provides a "view reference relationship" control. After detecting that the user triggers the operation of the "view reference relationship" control, the data traceability system 100 displays the reference relationship between the current calculation process and other calculation processes.

[0058] For example, 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 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, such as Figure 4 As shown, Figure 4 It is a schematic diagram of a reference relationship between calculation processes provided by the present application. It should be understood that if calculation process 1 and calculation process 2 are both loading data, then the calculation process types of calculation process 1 and calculation process 2 are both data set types; and calculation process 3 is a cumulative type.

[0059] 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, the fields of the data table and the related information of the fields can be quickly obtained, thereby improving the system's response speed and configuration efficiency, and improving user configuration efficiency.

[0060] 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 calculation process of invoicing data. 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 needs to go through calculation process 1, calculation process 2, calculation process 3, and calculation process 4 to obtain the calculation result corresponding to service 1; service 2 needs to go through calculation process 1, calculation process 3, calculation process 5, and calculation process 6 to obtain the calculation result of service 2; service 3 needs to go through calculation process 2, calculation process 3, calculation process 5, calculation process 7, and calculation process 8 to obtain the calculation result of service 3. Users can first complete the configuration of calculation process 1 to calculation process 8, and then select the calculation process corresponding to each service from the configured calculation process according to different services.

[0061] In the present application, a set of computing processes that implement a business computing is referred to as 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 This is a schematic diagram of a computing chain configuration interface provided by the present 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 Three computing chains are displayed, which are the computing chain information corresponding to business 1, business 2 and business 3. The user 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.

[0062] The user can select a calculation chain in the calculation chain list, such as Figure 5 As shown in the figure, 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. Figure 5 As shown in , the user triggers the "Add" control in the calculation process selection part, and the data traceability system 100 responds to the trigger operation and adds a blank row in the calculation process list. The user then clicks the input box in the row, and 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 triggers the "Save" control operation, the data traceability system 100 records the configuration of the calculation chain corresponding to business 2, that is, the configuration of business 2 is completed.

[0063] 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.

[0064] It should be noted that the multiple steps included in a calculation chain are not executed in sequence. 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 respectively; then use the calculation results of calculation process 2 and the calculation results of calculation process 3 as inputs of calculation process 5 to obtain the calculation result of calculation process 5; then use the calculation results of calculation process 5 and the calculation results of calculation process 7 as inputs of calculation process 8, execute calculation process 8, and obtain the calculation result corresponding to business 3.

[0065] 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 a 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 a user or a data traceability system finds that a record in a result table is abnormal, or a user wants to view which data in which data tables a record in a 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 the present application. The following introduces a data traceability method provided by the present application in conjunction with the accompanying drawings, such as Figure 6 As shown, Figure 6It is a flow chart of a data tracing method provided by this application.

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

[0067] 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 in 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.

[0068] It should be understood that the result table can be a new table generated based on one or more source data tables, or a table obtained by merging fields in other source data tables based on one of the source data tables, and this application does not make specific restrictions. In this application, the data tracing method provided by this application is introduced by taking the result table as a new table generated as an example.

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

[0070] In the present application, the result table includes a traceability field, and the field value of the traceability field corresponding to a record in the result table is used to indicate the original record corresponding to the record. When executing a calculation process to obtain a result table, the data traceability system 100 can determine the value of the traceability field based on 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 filtering 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 the one or more table identifiers, so 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 the result table; the filtering condition corresponding to a table identifier is used to indicate the original record of a record in the result table in the source data table represented by the table identifier.

[0071] For example, Figure 7As shown, 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: add 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.

[0072] 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 filtering condition corresponding to 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 filtering condition corresponding to 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.

[0073] Figure 8 It is a schematic diagram of another result table obtained from source data tables 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: add 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.

[0074] 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 1".

[0075] In a possible implementation, the data traceability system 100 can also obtain the traceability information corresponding to this calculation process based on the source data tables and the result table. Among them, the traceability information corresponding to a calculation process includes one or more traceability records. The number of traceability records included in the traceability information is the same as the number of source data tables used in this calculation process, that is, each source data table corresponds to one 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 result table in the source data table when it is executed.

[0076] Exemplarily, in Figure 7In the process of calculating Table C based on Table A and Table B, the traceability information shown in Table 1 can be obtained, and the traceability information includes two traceability records. Among them, the source data table 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 the 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.

[0077] Table 1

[0078] ID Results Table Source data table Source statement 1 C A Select * from A where ID = $id 2 C B Select * from B where ID = $id

[0079] in the case of Figure 8 The process of obtaining Table D based on Table A and Table B can generate the traceability information shown in Table 2 below, which includes two traceability records. Among them, the source data table in Table 1 includes table identifier A and table identifier 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 value of the traceability field 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.

[0080] Table 2

[0081]

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

[0083] For any result table generated by a calculation process, the user can view the data in the result table. For example, the user finds that a record in the result table is abnormal, or the user wants to view which data in which data tables a record in the result table is based on. The user can select the record in the result table. In this application, the record selected by the user 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 tracing system 100 obtains the field value of the tracing field corresponding to the record to be traced in the result table according to the record to be traced, and generates a tracing request based on the field value of the tracing field corresponding to the record to be traced. The tracing request includes a tracing parameter, which includes the field value of the tracing field corresponding to the record to be traced. The tracing request is used to instruct to find 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 Figure 7 In table C, if the record to be traced is a record with ID 1 in table C, the traceability parameters included in the traceability request are "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 the data tracing system 100 obtains the tracing request, it determines the tracing statement corresponding to the tracing request according to the tracing parameters in the tracing request. In the present application, the above result table is calculated based on the data of one or more source data tables, so each tracing request corresponds to one or more tracing statements, each source data table corresponds to a tracing statement, and each tracing 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 filtering condition in the conditional statement. After obtaining the traceability parameters, the data traceability system 100 generates the corresponding traceability statement according to the traceability parameters.

[0089] For example, Figure 8In Table D, 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 Figure 8 Table D in, 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: Section 1". The data traceability system 100 generates corresponding traceability statements as:

[0091] Select*from A,B

[0092] where a.entity = 0024and

[0093] a.produce = D

[0094] a.contract = b.contract

[0095] And

[0096] Select*from A,B

[0097] where b.entity = 0024and

[0098] b.subject = Section 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 the traceability request, the data traceability system 100 determines the traceability record corresponding to the result table according to the table identifier of the result table in the traceability request. For example, the two traceability records shown in Table 1 are found through the table identifier table of Table C. Therefore, the two traceability records corresponding to the traceability request can be determined according to the traceability request, and one traceability record includes a traceability statement. For example, the above-mentioned traceability statement Select*from A where ID=$id is used to determine the original record corresponding to a record in Table C in Table A.

[0102] The above-mentioned traceability parameters include the field value of the traceability field corresponding to the record to be traced, and the field value includes the table identifier of one or more source data tables and the screening condition corresponding to each table identifier. After obtaining the traceability statement corresponding to the traceability request, the data traceability system 100 determines a traceability record according to the table identifier of a source data table in the traceability parameters, and assigns a value to the parameter to be determined in the traceability statement in the traceability record, so as to obtain the corresponding executable traceability statement.

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

[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 abnormality selected by the user, the original record corresponding to the record to be traced is obtained through the above method, that is, the abnormality source is located, and the user can analyze the cause of the abnormality of the record to be traced based on the original record.

[0107] Exemplarily, if the record to be traced is a record with ID 2 in the above table C, the tracing statement corresponding to the tracing request includes the tracing statement "Select*from A where ID=4" corresponding to table A, and the tracing statement "Select*from B where ID=4" corresponding to table B. Executing these two tracing statements can output table A and table B, and display a record with ID 4 in table A and a record with ID 4 in table B in a manner different from other records in table A and table 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 described order of actions. 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. Other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of the present invention.

[0109] Combined with the above Figures 1 to 8 , describes in detail the data tracing method provided by this application, and will be combined with Figures 9 to 11 , describing the data tracing device, computing device and computing device cluster provided by this application.

[0110] like Fig. 9 As shown, Fig. 9 9 is a schematic diagram of the structure 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] The receiving module 920 is used to obtain a traceability request; the traceability request is used to request to find the reason for the abnormality of the 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 screening conditions corresponding to the one or more table identifiers. The above result table is obtained based on the source data table corresponding to one or more table identifiers in the traceability field, and the above 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. Among them, the result represents that it is obtained based on one or more source data tables, so the traceability request is also used to request to find 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, the user finds that a record in the result table is abnormal, or the user wants to see which data in which data tables a record in the result table is based on, and the user can select the record, which is the above record to be traced.

[0112] The processing module 910 is used to determine the traceability statement according to the traceability request, and execute the traceability statement to determine the abnormal cause corresponding to the traceability request; wherein the traceability statement is used to locate the original record corresponding to the record to be traced in the above 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 operation performed by the processing module 910 after obtaining the traceability request can refer to the above Figure 6 The related operations in S603 and S604 in the corresponding method embodiment are not described in detail here.

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

[0114] In the present 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 used 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 it to the receiving module 920 .

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

[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 a computing device cluster (including at least one computing device), and the display module 940 and the interaction module 950 are deployed in a terminal device used by a front-end user.

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

[0119] The present application also provides a computing device, such as Fig.10 As shown, Fig.10 1 is a schematic diagram of a computing device provided by the present application. The computing device 101 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 101 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 101.

[0120] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 101 (eg, the memory 106, the processor 104, and the 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, a co-processing unit may include 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, which is not specifically limited in the present application.

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

[0123] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to implement Figure 6 The method described in the corresponding method embodiment and the above Figure 2-Figure 5 That is, the memory 106 stores program codes for implementing the functions of the data traceability system 100, thereby implementing Figure 6 The data tracing method shown and the above Figure 2-Figure 5 The configuration process shown. The program code includes one or more software modules, and the one or more software modules include Fig. 9 The processing module 910, the receiving module 920, etc. in the data tracing device 900 shown in the figure, the processor 104 executes the executable program code to implement Figure 6 The corresponding methods and Figure 2-Figure 5 The corresponding flow of the configuration process shown 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, a laptop, or a smart phone.

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

[0126] In some possible implementations, the memories 106 of the multiple computing devices 101 in the computing device cluster may also store partial instructions for executing the above method, that is, the memories 106 of different computing devices 101 in the computing device cluster may store different instructions, respectively for executing Figure 6 The data tracing method shown and Figure 2-Figure 5 The configuration process shown in the figure can be implemented by a combination of multiple computing devices 101. Figure 6 The data tracing method in the embodiment shown and the above Figure 2-Figure 5 The configuration process is shown.

[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 or a local area network, etc. For example, two computing devices 101A and 101B are connected via a network. Specifically, the two computing devices 101A and 101B are connected to the network via a communication interface in each computing device.

[0128] The present application also provides a computer program product comprising instructions. The computer program product may be software or a program product comprising 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 Figure 6 The program code of the data tracing method in the embodiment shown and the above Figure 2-Figure 5 The configuration process is shown.

[0129] The present application also provides a computer-readable storage medium. The computer-readable storage medium may 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 may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to implement Figure 6 The program code of the data tracing method in the embodiment shown and the above Figure 2-Figure 5 The configuration method shown.

[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 cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the 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

Cited By

  • Data provenance method and apparatus, and related device

    EP4793790A1

  • Data provenance method and apparatus, and related device

    WO2025098455A1