Business data tracing method, system, device, computer equipment and storage medium

By obtaining and utilizing the tag set of business data, including parent data identification and current data level, a relationship tree is constructed, which solves the problem of difficulty in tracing high-frequency and large-volume business data in traditional technology, and achieves efficient traceability of business data. .

CN118503259BActive Publication Date: 2024-10-29HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410954996.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-29
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

In high-frequency changing business data derivation scenarios, it is difficult for traditional technologies to effectively track and trace business data with large amounts of data and frequent changes.

Method used

By obtaining the tag set of the business data to be traced, including data tags, each data tag contains the parent data identifier and the current data level, and using these tag sets to trace the source. The specific steps include obtaining the initial business data, calculating the deducible business data and Set data labels for them, and build a relationship tree based on the label collection to achieve traceability.

Benefits of technology

In business data derivation scenarios with high-frequency changes and large amounts of data, the derivation process of the data to be traced can be accurately determined with a small amount of data to achieve efficient traceability of business data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503259B_ABST
    Figure CN118503259B_ABST
Patent Text Reader

Abstract

The present application relates to a business data tracing method, system, device, computer equipment and storage medium. The method comprises: obtaining a tag set of business data to be traced, the tag set comprising at least one data tag, each data tag comprising a parent data identifier and a current data level, wherein the parent data identifier comprises a business data identifier for determining all business data of the current business data, the current data level comprises the current data level and all data levels before the current data level; tracing the business data to be traced according to the tag set. Through the parent data identifier and the current data level in the tag set, the present application can determine the derivation process of the data to be traced with a smaller amount of data in a business data derivation scenario with high-frequency changes and large data volume, thereby tracing the business data to be traced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a business data tracing method, system, device, computer equipment and storage medium. Background Art

[0002] In the business data computing scenario, some business data can be derived from other business data. However, when business data changes frequently, each change in the previous business data will affect the derivation results of the subsequent business data. Therefore, in traditional technologies, it is difficult to track and trace the derivation process of business data with large data volume and high data change frequency.

[0003] Based on this, in the scenario of deducing business data with high frequency changes, there is an urgent need for a method to trace the source of business data. Summary of the invention

[0004] Based on this, it is necessary to provide a business data tracing method, system, device, computer equipment and storage medium that can trace the business data in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for tracing the origin of business data. The method comprises:

[0006] Obtain a tag set of the business data to be traced, the tag set including at least one data tag, each data tag including a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for all business data used to determine the current business data, and the current data level includes the current data level and all data levels before the current data level;

[0007] The business data to be traced is traced according to the tag set.

[0008] In one embodiment, each data tag further includes a business data identifier, and obtaining a tag set of the business data to be traced includes:

[0009] Obtaining the business data identifier of the business data to be traced;

[0010] According to the business data identifier, all data tags corresponding to the business data to be traced are determined.

[0011] In one embodiment, the data tag is determined according to the following method:

[0012] Acquire initial business data, and set a data tag for the initial business data;

[0013] Based on the initial business data, the corresponding derivable business data are calculated in sequence, and data tags are set for each derivable business data in sequence; the business data identifier of the data tag corresponding to the initial business data matches the business data identifier of the data tag corresponding to each derivable business data.

[0014] In one embodiment, the obtaining of initial service data and setting a data tag for the initial service data includes:

[0015] Acquire the initial service data, and determine the service data identifier according to the system time;

[0016] Determine the parent data identifier as a preset parameter;

[0017] Establishes the data hierarchy to the current system value.

[0018] In one of the embodiments, the initial service data is obtained, and the service data identifier is determined according to the system time;

[0019] The local cache contains the system time;

[0020] Update the system time in the local cache at preset time intervals through threads;

[0021] Get the initial business data and the corresponding system time in the local cache;

[0022] The business data identifier is determined according to the system.

[0023] In one embodiment, the step of sequentially calculating corresponding derivable business data based on the initial business data, and sequentially setting a data label for each derivable business data comprises:

[0024] Obtaining intermediate business data required for calculating the next derivable business data;

[0025] Based on the initial business data and the intermediate business data, determine the next derivable business data, and use the business data identifier corresponding to the initial business data as the business data identifier corresponding to the next derivable business data; use the business data identifiers corresponding to all business data required to determine the next derivable business data as the parent data identifier corresponding to the next derivable business data; determine the data level corresponding to the next derivable business data according to the data level corresponding to the initial business data and the current system value;

[0026] Determine each derivable business data in turn, and set a data label for each derivable business data until all derivable business data are completed.

[0027] In one embodiment, tracing the to-be-traced business data according to the tag set includes:

[0028] Determining a maximum data level in the tag set;

[0029] Taking the business data identifier corresponding to the largest data level as the root node, a relationship tree of the business data to be traced is constructed according to the tag set based on a breadth-first traversal algorithm.

[0030] In a second aspect, the present application also provides a business data tracing system, the system comprising a distribution node and a business data tracing module, wherein:

[0031] The distribution node is used to generate a label set of the business data to be traced;

[0032] The business data tracing module is used in the steps of any one of the methods in the first aspect above.

[0033] In one of the embodiments, the business data tracing module is also used to write the business data identifier into a data row of an HBase database, write the current data level into a data column of the HBase database, and write the parent data identifier into a field value of the HBase database.

[0034] In a third aspect, the present application also provides a business data tracing device. The device comprises:

[0035] A tag set acquisition module, used to acquire a tag set of the business data to be traced, wherein the tag set includes at least one data tag, each data tag includes a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for determining all business data of the current business data, and the current data level includes the current data level and all data levels before the current data level;

[0036] The traceability module is used to trace the business data to be traced according to the tag set.

[0037] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of any business data tracing method in the first aspect when executing the computer program.

[0038] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the business data tracing methods in the first aspect.

[0039] The above-mentioned business data tracing method, system, device, computer equipment and storage medium obtain a tag set of the business data to be traced, the tag set includes at least one data tag, each data tag includes a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for all business data used to determine the current business data, and the current data level includes the current data level and all data levels before the current data level; the business data to be traced is traced according to the tag set. The present application uses the parent data identifier and the current data level in the tag set to determine the derivation process of the data to be traced with a smaller amount of data in a business data derivation scenario with high-frequency changes and large data volumes, thereby tracing the business data to be traced.

[0040] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0042] Figure 1 This is an application environment diagram of a business data tracing method in an embodiment;

[0043] Figure 2 A flowchart of a method for tracing the origin of business data in one embodiment;

[0044] Figure 3 A schematic diagram of a method for determining a tag set in a specific embodiment;

[0045] Figure 4 A schematic diagram of a relationship tree of business data to be traced in a specific embodiment;

[0046] Figure 5 A schematic diagram of a business data tracing system in one embodiment;

[0047] Figure 6 It is a structural block diagram of a business data tracing device in an embodiment;

[0048] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0051] The terms "module", "unit", etc. used below are a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in hardware, the implementation of software, or a combination of software and hardware is also possible and conceivable.

[0052] The business data tracing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 obtains a tag set of the business data to be traced and sends it to the server 104. The tag set includes at least one data tag, and each data tag includes the data name corresponding to the current business data, the parent data identifier, and the current data level, wherein the parent data identifier includes a business data identifier for all business data used to determine the current business data, and the current data level includes the current data level and all data levels before the current data level. The server 104 traces the business data to be traced according to the tag set. In other embodiments, the above steps can also be implemented by the terminal 102 or the server 104, and the present application does not specifically limit the subject of the execution of the above steps. Among them, the server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0053] In one embodiment, Figure 2 As shown, a business data tracing method is provided, which is applied to Figure 1 The application scenario in is taken as an example to illustrate, including the following steps:

[0054] S201: Obtain a tag set for business data to be traced, wherein the tag set includes at least one data tag, and each data tag includes a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for determining all business data of the current business data, and the current data level includes the current data level and all data levels before the current data level.

[0055] In an embodiment of the present application, the business data to be traced includes business data derived from the initial business data. Therefore, it can be understood that if the initial business data changes, the business data to be traced will also change accordingly. The label set of the business data to be traced is used to represent the derivation process of the business data to be traced, and the label set includes at least one data label. It should be noted that the specific derivation relationship from the initial business data to the business data to be traced in the present application is a preset derivation relationship. There are the same or similar scenarios where the initial business data is derived layer by layer to the business data to be traced according to the preset derivation relationship, and the embodiments provided in the present application can be used for traceability.

[0056] In an embodiment of the present application, each data tag includes a parent data identifier and a current data level. The parent data identifier includes a business data identifier for determining all business data of the current business data. In some embodiments, there is at least one business data to be derived in each data level, that is, the current business data, and the parent data identifier includes a business data identifier for determining all business data of the business data to be derived in the current data level. The business data identifier is an identifier corresponding to the business data, which can be used to identify the name and information of the business data.

[0057] The current data level includes the level where the current business data is located, and all previous data levels. It should be noted that in the business data derivation process described in the embodiments of the present application, the direction of deriving the data to be traced layer by layer from the initial business data is from front to back. All previous data levels include all data levels from the previous level of the current business data to the level where the initial data is located.

[0058] In some specific embodiments, if the current business data is business data to be traced, the current data level includes the level where the business data to be traced is located, as well as all data levels from the previous data level of the business data to be traced to the data level where the initial business data is located.

[0059] In some embodiments, each tag data also includes a data name corresponding to the current business data, and the data name of each business data matches the business data identifier of the business data and the data level it is in. That is, based on the business data identifier and / or data level of the business data, the data name of the business data can be correspondingly determined.

[0060] S203: Tracing the business data to be traced according to the tag set.

[0061] In an embodiment of the present application, based on the above embodiment, it can be known that in the process of deriving the data to be traced layer by layer from the initial business data, each data level can generate at least one data label, and the label set obtained from the data label can be used to trace the business data to be traced.

[0062] In some embodiments, tracing the business data to be traced may include determining the data layer involved in the derivation of the business data to be traced according to the current data layer in the tag set, and then determining the business data involved in the derivation of the business data to be traced in each data layer according to the parent data identifier. Specifically, the derivation process of the business data to be traced can be determined from front to back according to the tag set, or from back to front, or the derivation process of the business data to be traced can be directly constructed according to the tag set. This application does not limit the specific method of tracing the business data to be traced.

[0063] Through the parent data identifier and the current data level in the tag set, the present application can determine the derivation process of the data to be traced with a smaller amount of data in business data derivation scenarios with high frequency changes and large data volumes, thereby tracing the business data to be traced.

[0064] In some embodiments, each data tag further includes a business data identifier, and obtaining a tag set of the business data to be traced includes:

[0065] S301: Obtain the business data identifier of the business data to be traced.

[0066] S303: Determine all data tags corresponding to the business data to be traced according to the business data identifier.

[0067] In an embodiment of the present application, each data tag may also include a business data identifier, and the business data identifier is used to identify all business data involved in the business data to be traced. When the initial business data changes, the data to be traced derived from the initial business data also changes accordingly, and each data change process corresponds to a derivation process for the business data to be traced. If the initial business data changes frequently, there will be multiple derivation processes in a short period of time, and accordingly there will be multiple business data to be traced and their derivation processes. Therefore, by determining the business data identifier of each data to be traced, the derivation process of the target business data to be traced can be determined efficiently and accurately.

[0068] In an embodiment of the present application, a method for determining a data tag is provided. In some embodiments, the data tag is determined according to the following method:

[0069] S401: Acquire initial business data, and set a data tag for the initial business data.

[0070] S403: Based on the initial business data, the corresponding derivable business data are calculated in sequence, and data tags are set for each derivable business data in sequence; the business data identifier of the data tag corresponding to the initial business data matches the business data identifier of the data tag corresponding to each derivable business data.

[0071] In an embodiment of the present application, the initial business data is the starting data for deriving the business data to be traced. After obtaining the initial business data, a data label is set for the initial business data. According to the initial business data, the corresponding derivable business data is calculated in sequence, and a data label is set for each derivable business data in sequence. Among them, the derivable business data may include intermediate data for deriving the business data to be traced, and the business data to be traced obtained by the final derivation.

[0072] In order to facilitate efficient and accurate determination of the business data involved in each traceability, the business data identifier of the data tag corresponding to the initial business data is matched with the business data identifier of the data tag corresponding to each derivable business data. Specifically, the matching may include that the data identifier of the initial business data is the same as that of each derivable business data; or it may include that the data identifier of the initial business data and each derivable business data is determined based on the same preset rule. For example, the data identifiers of the initial business data and each derivable business data may both be 20200606, or the data identifier of the initial business data may be set to 20200606001, and the data identifier of the next-level business data may be set to 20200606002, until the data identifier of the business data to be traced is set to 20200606n, where n is the current data level of the business data to be traced. There is no restriction on the specific determination method of the data identifier of the business data, and it is only necessary to distinguish the business data involved in the different derivation processes of different traceable business data.

[0073] Since a unique identifiable identifier is set for each business data to be traced and the business data involved in its derivation process, all data labels corresponding to the business data to be traced can be determined based on the business data identifier, thereby tracing the traceable business data more efficiently and accurately.

[0074] The following describes the method of setting the data tag for the initial business data through the embodiments of the present application. In some embodiments, the obtaining of the initial business data and setting the data tag for the initial business data includes:

[0075] S501: Acquire the initial service data, and determine the service data identifier according to the system time.

[0076] S503: Determine the parent data identifier as a preset parameter.

[0077] S505: Determine the data level as the current system value.

[0078] In an embodiment of the present application, the business data identifier of the initial business data can be determined according to the system time. Specifically, a unique identifier can be determined according to the system time as the business data identifier. For example, the business data identifier can be determined according to the system time by means of a snowflake algorithm, UUID, etc. Since the initial business data is the starting point of the derivation and there is no parent business data, the parent data identifier can be set to a preset parameter such as an empty set or 0. The data level of the initial business data is determined as the current system value. Since the current data level may include multiple computer devices participating in the derivation at the same time, determining the data level as the current system value may include determining the current system value according to the current data level and the identity identifiers of the computer devices participating in the derivation of the current data level. In other embodiments, the current data level may also be directly used as the current system value.

[0079] In the process of determining the business data identifier based on the system time, if the initial business data changes frequently and needs to be derived under high concurrency, the system time interface needs to be called frequently, and the large data flow may cause system delays or even crashes. Based on this, the embodiment of the present application also provides a data identifier determination method that reduces system performance loss.

[0080] In some embodiments, the obtaining of the initial service data determines the service data identifier according to the system time;

[0081] S601: The system time is cached in the local cache.

[0082] S603: Update the system time in the local cache at a preset time interval through a thread.

[0083] S605: Acquire initial business data, and acquire corresponding system time in the local cache.

[0084] S607: Determine the business data identifier according to the system.

[0085] In the embodiment of the present application, the system time in the local cache is cached by setting the system time in the local cache, and the system time is updated by calling the time interface at a preset time interval to obtain the system time. In some specific embodiments, the preset time interval is one millisecond. In the case of changes in the initial business data, the initial business data is obtained and the system time is obtained in the local cache, and then the business data identifier is determined according to the system time.

[0086] The business data identification determination method provided in this application obtains and updates the system time in the local cache at preset time intervals through the cache, avoiding the performance loss caused by multiple calls to the system's underlying time interface in a short period of time in high concurrency scenarios, and effectively saving the system's computing resources.

[0087] The specific setting method of the data tag is described below through the embodiments of the present application. In some embodiments, the corresponding derivable business data is calculated in sequence based on the initial business data, and the data tag is set for each derivable business data in sequence, including:

[0088] S701: Acquire intermediate business data required for calculating the next derivable business data.

[0089] S703: Based on the initial business data and the intermediate business data, determine the next derivable business data, and use the business data identifier corresponding to the initial business data as the business data identifier corresponding to the next derivable business data; use the business data identifiers corresponding to all business data required to determine the next derivable business data as the parent data identifier corresponding to the next derivable business data; determine the data level corresponding to the next derivable business data according to the data level corresponding to the initial business data and the current system value.

[0090] S705: Determine each derivable business data in turn, and set a data tag for each derivable business data until all derivable business data are completed.

[0091] In some specific embodiments, the business data may include an exchange rate. The following takes the exchange rate derivation scenario as an example to illustrate the determination method of the tag set of the present application.

[0092] When the initial exchange rate data update is obtained, the exchange rate data tag is set to: Tag{rateId, parent, span} triple data, where rateId is the business data identifier, parent is the parent data identifier; span is the current data level. The business data identifier (rateId) is generated according to the embodiment described in steps S601-S607, the current data level (span) can be further determined as the current system value A, and the parent data identifier (parent) is determined as an empty set. When the intermediate exchange rate data pushed by the previous data level is received and the new exchange rate data is calculated, the business data identifier (rateId) of the data tag corresponding to the exchange rate data is the same as the business data identifier (rateId) of the exchange rate data of the previous data level. In addition, because the exchange rate data of the current data level is obtained from the previous data level, the current data level (span) can be the current data level (span) of the exchange rate of the previous data level plus the current system value. The exchange rate data of the next data level is calculated layer by layer until the exchange rate data to be traced is determined.

[0093] Specifically, Figure 3 As shown in the figure, the change of the US dollar deposit interest rate is used to finally affect the option fee of the US dollar against the RMB to illustrate how to determine the label set:

[0094] Figure 3The business data involved are the swap rate of USD to RMB (USDRMB_SWAP), USD deposit rate (USD_RATE), RMB deposit rate (RMB_RATE), USD forward rate (USDRMB_FWD), USD spot rate (USDRMB_SP), USD option premium (USDRMB_OPT), USD option strike price (STRIKE), and USD volatility (VOL).

[0095] When system A receives the value change of USD_RATE, a new business data identifier 1 (rateId1) is generated, with the data tag of USD_RATE{rateId1,parent[],A}, that is, the data tag is {business data identifier 1, parent data identifier = empty set, current data level = A}, and is pushed to system B. System B calculates the swap rate of USD against RMB (USDRMB_SWAP) and pushes it to system C, with the data tag of {rateId1,parent[rateId1,rateId2], A,B}, that is, the data tag is {business data identifier 1, parent data identifier = [business data identifier 1, business data identifier 2], current data level = A, B}, where business data identifier 2 (rateId2) is the unique identifier of RMB_RATE, the RMB deposit rate. System C starts to calculate the forward exchange rate of USD against RMB (USDRMB_FWD) and pushes it to system D. The data tag is {rateId1,parent[rateId1,rateId3],A, B, C}, that is, the data tag is {business data identifier 1, parent data identifier = [business data identifier 1, business data identifier 3], current data level = A, B, C}, where business data identifier 3 (rateId3) is the unique identifier of the spot exchange rate of USD against RMB (USDRMB_SP). System D starts to calculate the option premium for USD / RMB (USDRMB_OPT), and the data label is {rateId1,parent[rateId1,rateId4,rateId5,rateId6],A,B,C,D}, that is, the data label is {business data identifier 1, parent data identifier = [business data identifier 1, business data identifier 4, business data identifier 5, business data identifier 6], current data level = A, B, C, D}, where business data identifier 4 (rateId4) is the unique identifier of the USD / RMB option exercise price STRIKE, business data identifier 5 (rateId5) is the unique identifier of the USD / RMB exchange rate volatility (VOL), and business data identifier 6 (rateId6) is the unique identifier of the RMB deposit rate (RMB_RATE).

[0096] In some embodiments, tracing the to-be-traced business data according to the tag set includes:

[0097] S801: Determine the largest data level in the tag set.

[0098] S803: Taking the business data identifier corresponding to the largest data level as a root node, constructing a relationship tree of the business data to be traced according to the tag set based on a breadth-first traversal algorithm.

[0099] In the embodiment of the present application, the largest data level in the tag set is determined, that is, the data level where the business data to be traced is located. The business data identifier corresponding to the largest data level is used as the root node, and a relationship tree of the business data to be traced is constructed according to the tag set based on a breadth-first traversal algorithm. Among them, the breadth-first traversal algorithm can refer to the application method in the prior art, and this application will not go into details. In some specific embodiments, still taking the above specific embodiment as an example, a relationship tree of the business data to be traced is constructed according to the tag set. Figure 4 shown.

[0100] In other specific embodiments, the business data tracing method provided in the embodiments of the present application can also be used in blockchain tracing scenarios. Business data may include block nodes. A data node label set of the block to be traced is obtained, the label set including at least one data label, each data label including the data identifier of the previous block node and the current block height. Among them, the data identifier of the previous block node includes a node data identifier for determining all node data of the current block, and the current block height includes all block heights from the initial block to the block to be traced. According to the label set, the block node to be traced can be traced to achieve the traceability of the generation process of the block to be traced using less data.

[0101] In an embodiment of the present application, a business data tracing system is also provided, which includes a distribution node and a business data tracing module, wherein the distribution node is used to generate a label set for the business data to be traced; and the business data tracing module is used to implement the steps of the business data tracing method described in any of the above embodiments.

[0102] In some embodiments, the business data tracing module is also used to write the business data identifier into a data row of an HBase database, write the current data level into a data column of the HBase database, and write the parent data identifier into a field value of the HBase database.

[0103] In a specific embodiment, Figure 5As shown, in the distributed business data traceability system, the tag set is stored in the local log file according to the tag quantity threshold and the preset storage time interval. By setting the tag quantity threshold and the preset storage time interval, the storage time can be controlled from the two perspectives of quantity and time to avoid high delays. The distributed node includes multiple computing systems, each computing system includes at least one application node, and the application node may include a computer device for deriving the business data to be traced. Each application node is provided with a daemon process for storing the data tags involved in the computing system.

[0104] The business data traceability module includes a collection component, which pulls data tags from the log files of the application nodes and writes them into the HBase database. Since HBase is a column-based storage database, it does not waste storage space for non-existent columns and is suitable for the storage of large amounts of sparse data sets. The HBase table is designed as follows: the rowKey (data row id) is the business data identifier (rateId), the column name is the current data level (span), and the field value is the parent data identifier (parent). When tracing the source business data to be traced, the data row whose rowKey is equal to the business data identifier (rateId) is queried from the HBase database table based on the business data identifier (rateId). Starting from the data node with the largest current data level (span), the tree structure of the business data to be traced is constructed based on the parent data identifier (parent) array and the breadth-first traversal algorithm.

[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0106] Based on the same inventive concept, the embodiment of the present application also provides a business data tracing device 900 for implementing the business data tracing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more business data tracing device embodiments provided below can refer to the limitations of the business data tracing method above, and will not be repeated here.

[0107] In one embodiment, Figure 6 As shown, a business data tracing device 900 is provided, including:

[0108] The tag set acquisition module 901 is used to acquire a tag set of the business data to be traced, wherein the tag set includes at least one data tag, each data tag includes a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for determining all business data of the current business data, and the current data level includes the current data level and all data levels before the current data level;

[0109] The tracing module 902 is used to trace the business data to be traced according to the tag set.

[0110] In some embodiments, the tag set acquisition module 901 is further used to obtain the business data identifier of the business data to be traced; and determine all data tags corresponding to the business data to be traced according to the business data identifier.

[0111] In some embodiments, the label set acquisition module 901 is also used to acquire initial business data and set data labels for the initial business data; based on the initial business data, the corresponding derivable business data is calculated in sequence, and data labels are set for each derivable business data in sequence; the business data identifier of the data label corresponding to the initial business data matches the business data identifier of the data label corresponding to each derivable business data.

[0112] In some embodiments, the tag set acquisition module 901 is also used to acquire the initial business data, determine the business data identifier according to the system time; determine the parent data identifier as a preset parameter; and determine the data level as the current system value.

[0113] In some embodiments, the tag set acquisition module 901 is also used to cache the system time in the local cache; update the system time in the local cache through a thread at a preset time interval; obtain initial business data and obtain the corresponding system time in the local cache; determine the business data identifier based on the system time.

[0114] In some embodiments, the label set acquisition module 901 is also used to acquire intermediate business data required for calculating the next derivable business data; determine the next derivable business data based on the initial business data and the intermediate business data, and use the business data identifier corresponding to the initial business data as the business data identifier corresponding to the next derivable business data; use the business data identifiers corresponding to all business data required to determine the next derivable business data as the parent data identifier corresponding to the next derivable business data; determine the data level corresponding to the next derivable business data based on the data level corresponding to the initial business data and the current system value; determine each derivable business data in turn, and set a data label for each derivable business data until all derivable business data are completed.

[0115] In some embodiments, the tracing module 902 is also used to determine the largest data level in the tag set; using the business data identifier corresponding to the largest data level as the root node, and constructing a relationship tree of the business data to be traced according to the tag set based on a breadth-first traversal algorithm.

[0116] Each module in the business data tracing device 900 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0117] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business data tracing method is implemented.

[0118] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0119] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the business data tracing method in any of the above embodiments are implemented.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the business data tracing method in any of the above embodiments are implemented.

[0121] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the business data tracing method in any of the above embodiments.

[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A business data tracing method, characterized in that: The method comprises: Obtain a tag set of the business data to be traced, the tag set including at least one data tag, each data tag including a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for all business data used to determine the current business data, and the current data level includes the current data level and all data levels before the current data level; Tracing the business data to be traced according to the tag set; Each data tag also includes a business data identifier, and the tag set for obtaining the business data to be traced includes: Obtaining the business data identifier of the business data to be traced; According to the business data identifier, determine all data tags corresponding to the business data to be traced; The data tags are determined in the following manner: Acquire initial business data, and set a data tag for the initial business data; Based on the initial business data, corresponding derivable business data are calculated in sequence, and data tags are set for each derivable business data in sequence; the business data identifier of the data tag corresponding to the initial business data matches the business data identifier of the data tag corresponding to each derivable business data; The tracing of the to-be-traced business data according to the tag set includes: Determining a maximum data level in the tag set; Taking the business data identifier corresponding to the largest data level as the root node, a relationship tree of the business data to be traced is constructed according to the tag set based on a breadth-first traversal algorithm.

2. The method according to claim 1, characterized in that The obtaining of initial business data and setting of data tags for the initial business data includes: Acquire the initial service data, and determine the service data identifier according to the system time; Determine the parent data identifier as a preset parameter; Determines the data level to the current system value.

3. The method according to claim 2, characterized in that The initial service data is obtained, and the service data identifier is determined according to the system time; The local cache contains the system time; Update the system time in the local cache at preset time intervals through threads; Get the initial business data and the corresponding system time in the local cache; The service data identifier is determined according to the system time.

4. The method according to claim 2, characterized in that: The step of sequentially calculating corresponding derivable business data based on the initial business data, and sequentially setting a data label for each derivable business data comprises: Obtaining intermediate business data required for calculating the next derivable business data; Based on the initial business data and the intermediate business data, determine the next derivable business data, and use the business data identifier corresponding to the initial business data as the business data identifier corresponding to the next derivable business data; use the business data identifiers corresponding to all business data required to determine the next derivable business data as the parent data identifier corresponding to the next derivable business data; determine the data level corresponding to the next derivable business data according to the data level corresponding to the initial business data and the current system value; Determine each derivable business data in turn, and set a data label for each derivable business data until all derivable business data are completed.

5. A business data tracing system, characterized in that: The system includes distribution nodes and a business data tracing module, wherein: The distribution node is used to generate a label set of the business data to be traced; The business data tracing module is used to implement the steps of any one of the methods of claim 1 to claim 4.

6. The system according to claim 5, characterized in that The business data tracing module is also used to write the business data identifier into the data row of the HBase database, write the current data level into the data column of the HBase database, and write the parent data identifier into the field value of the HBase database.

7. A business data tracing device, characterized in that: The device comprises: A tag set acquisition module, used to acquire a tag set of the business data to be traced, wherein the tag set includes at least one data tag, each data tag includes a parent data identifier and a current data level, wherein the parent data identifier includes a business data identifier for determining all business data of the current business data, and the current data level includes the current data level and all data levels before the current data level; A tracing module, used to trace the business data to be traced according to the tag set; The tag set acquisition module is further used to acquire the business data identifier of the business data to be traced; and determine all data tags corresponding to the business data to be traced according to the business data identifier; The tag set acquisition module is further used to acquire initial business data and set data tags for the initial business data; based on the initial business data, the corresponding derivable business data is calculated in sequence, and data tags are set for each derivable business data in sequence; the business data identifier of the data tag corresponding to the initial business data matches the business data identifier of the data tag corresponding to each derivable business data; The tracing module is also used to determine the largest data level in the tag set; using the business data identifier corresponding to the largest data level as the root node, and constructing a relationship tree of the business data to be traced according to the tag set based on a breadth-first traversal algorithm.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Multi-source heterogeneous data label generation method and system

    CN114969392A

  • Data tracing method and device

    CN116088874A