A method and system for integrating and querying piecework data related to departments with tree-like node linkage

By using hash-dependent directed acyclic graphs and incremental update paths, combined with composite fingerprint differential calculation, the problems of high computational complexity and data lag during large-scale product structure changes are solved, achieving real-time and accurate piecework data and supporting efficient traceability of historical status.

CN121764976BActive Publication Date: 2026-05-26NINGBO JINYU TECHNOLOGY INDUSTRY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGBO JINYU TECHNOLOGY INDUSTRY CO LTD
Filing Date
2026-03-04
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing data integration solutions suffer from high computational complexity when facing large-scale product structure changes, resulting in redundant computing power and disk I/O bottlenecks. Data lag exists between design changes and financial accounting, and it is difficult to guarantee the consistency of cross-departmental data and the traceability of historical status.

Method used

By employing a hash-dependent directed acyclic graph combined with incremental update paths, and constructing a hash-dependent directed acyclic graph of the topology, recursively updating only the affected source node to root node path, combined with differential calculation and caching library of composite fingerprints, the real-time and accuracy of piecework data is achieved, and efficient storage and auditing are realized by utilizing historical root fingerprints.

Benefits of technology

It reduces computational complexity, ensures millisecond-level real-time response of piecework data, avoids data lag between design changes and financial accounting, improves data query efficiency and cross-departmental data accuracy, and supports low-cost tracing of historical status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764976B_ABST
    Figure CN121764976B_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial manufacturing information management and data processing technology, specifically to a method and system for integrating and querying piecework data related to departmental relationships through tree-like node linkage. The method includes: constructing a hash-dependent directed acyclic graph (DAG) corresponding to the topological structure; obtaining the current composite fingerprint of the target root node; retrieving the current composite fingerprint from a cache library; if the retrieval is successful, directly returning the pre-stored aggregation result mapped in the cache library; otherwise, traversing downwards along the hash-dependent DAG, determining if the fingerprint has not changed and directly calling the pre-stored aggregation result; for sub-branches without a composite fingerprint mapping in the cache library, determining if the fingerprint has changed and performing real-time data aggregation calculation to generate a new aggregation result; establishing a mapping relationship and writing it into the cache library for subsequent query calls. This invention ensures millisecond-level real-time response of piecework cost data in scenarios with frequent engineering changes, eliminating data lag between design changes and financial accounting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial manufacturing information management and data processing technology, specifically to a method and system for integrating and querying departmental piecework data with tree-like node linkage. Background Technology

[0002] In complex equipment manufacturing and product lifecycle management scenarios, the product structure tree typically contains tens of thousands of component nodes and involves piece-rate wages and cost accounting across multiple departments. As engineering design iterates, the BOM structure and the geometric and value attributes of each node will frequently change.

[0003] Existing data integration solutions generally adopt a recursive summation architecture based on relational databases. This means that for each query or change, the system needs to perform a full traversal scan of the entire physical BOM table, accumulating the attribute values ​​of child nodes layer by layer to generate the aggregation result. While this approach is logically simple, its computational complexity is positively correlated with the tree size when dealing with extremely large-scale data structures, leading to severe computational redundancy and disk I / O bottlenecks. Once a local design change occurs, a global recalculation is often triggered, causing a significant data lag between the design status and financial accounting. Furthermore, due to the lack of a sensitive capture mechanism for changes in multi-dimensional attributes, it is difficult to guarantee the consistency of cross-departmental data and the traceability of historical status. Therefore, how to reduce the computational overhead under large-scale structural changes, achieve millisecond-level linkage updates between piecework data and design status, and ensure the real-time performance and accuracy of data queries has become an urgent technical problem to be solved. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for integrating and querying departmental piecework data through tree-structured node linkage. This method can compress computational complexity from the entire tree scale to the depth of the change path, avoid data lag between design changes and financial accounting, and accurately capture multi-dimensional changes in geometry, piecework, and assembly structures, ensuring the real-time performance, accuracy, and historical traceability of piecework data calculation. Specifically, the technical solution of this invention is as follows:

[0005] A method for integrating and querying departmental piecework data with tree-structured node linkage, comprising:

[0006] Based on the preset product structure tree data, a hash-dependent directed acyclic graph corresponding to the topology is constructed. Each node in the hash-dependent directed acyclic graph stores a composite fingerprint. The composite fingerprint is calculated and generated based on the node's geometric attribute data, multi-dimensional piece count attribute vector, assembly quantity of child nodes, and the composite fingerprint combination of all child nodes of that node.

[0007] In response to a change management event for the product tree structure, the affected source node is identified, and the composite fingerprint of the parent node is recursively updated only upwards along the tree structure until the root node, forming an incremental update path.

[0008] In response to a piecework data query request targeting a specific department, obtain the current composite fingerprint of the target root node;

[0009] Based on the current composite fingerprint, a differential calculation process is performed in a preset cache library, including:

[0010] Step 1: Retrieve the current composite fingerprint in the cache library. If the search is successful, further match the unique identifier of the target node. If the match is successful, directly return the pre-stored aggregation result mapped in the cache library.

[0011] Step 2: If the search fails, traverse downwards along the hash-dependent directed acyclic graph. For sub-branches with composite fingerprint mappings in the cache, determine that the fingerprint has not changed and directly call the pre-stored aggregation result. For sub-branches without composite fingerprint mappings in the cache, determine that the fingerprint has changed and perform real-time data aggregation calculation to generate a new aggregation result.

[0012] Step 3: Establish a mapping relationship between the new aggregation result and the corresponding current composite fingerprint, and write it into the cache library for subsequent query calls.

[0013] Optionally, the composite fingerprint is calculated and generated based on the node's geometric attribute data, multi-dimensional piece-counting attribute vector, and the composite fingerprints of all child nodes of that node, including:

[0014] Retrieve the geometric attribute identifier data of the current node;

[0015] Obtain piece-rate price data for the current node under different departmental dimensions, and construct a sparse attribute vector;

[0016] Obtain the composite fingerprints of all direct child nodes of the current node and perform sequence combination processing;

[0017] The geometric attribute identification data, the sparse attribute vector, the child node fingerprint after sequence combination processing, and the corresponding assembly quantity are concatenated, and the composite fingerprint is generated by a preset hash algorithm.

[0018] Optionally, responding to a change management event for the product structure tree includes: receiving an engineering change instruction issued by the change management module, the instruction containing an identifier of the changed node and the changed attribute value; locating the source node based on the identifier and recalculating the composite fingerprint of the source node; locking the parent node of the source node, recalculating the composite fingerprint of the parent node using the updated composite fingerprint of the source node, and iterating upwards sequentially until the root node of the hash-dependent directed acyclic graph; and keeping the composite fingerprints of the remaining branch nodes not on the incremental update path unchanged.

[0019] Optionally, step 2 involves real-time data aggregation calculations for sub-branches where fingerprints have changed, including:

[0020] Nodes for which no composite fingerprint mapping is found in the cache are identified and marked as nodes to be computed;

[0021] Based on the specific department identifier in the query request, extract the corresponding piece-rate unit price value from the attribute vector of the node to be calculated;

[0022] The aggregation results of all sub-branches of the node to be calculated are obtained recursively. The assembly quantity corresponding to the sub-branch is read, the product of the aggregation result of the sub-branch and the assembly quantity is calculated, and the sum of the product of the piece rate unit price and all sub-branches is arithmetically added to generate the new aggregation result.

[0023] Optionally, in step 2, for sub-branches where the fingerprint has not changed, the pre-stored aggregation result can be directly called, including:

[0024] During the downward traversal, check whether the composite fingerprint of the current child node exists in the cache.

[0025] If a unique identifier of a node exists and is recorded in a mapping record corresponding to the composite fingerprint that is consistent with the current child node, then the traversal operation of the child node and all its subordinate child nodes shall be terminated immediately.

[0026] The aggregated value corresponding to the composite fingerprint of the child node in the cache library is directly read as the calculation result of the branch.

[0027] Optionally, the cache library uses a key-value pair mapping structure to store data, including:

[0028] The hash value of the composite fingerprint is used as the key;

[0029] The value is the aggregated total cost of the corresponding node across different departmental dimensions.

[0030] The cache library is configured with a write verification mechanism based on hash collision detection.

[0031] Optionally, the method may also include a historical data backtracking step:

[0032] Store the composite fingerprint of the root node at a historical moment;

[0033] In response to a historical audit request, the root node composite fingerprint of the historical moment is retrieved from the cache library to reconstruct a complete piecework data view for that historical moment, in order to verify data consistency.

[0034] A tree-structured, interconnected departmental piecework data integration and query system includes:

[0035] The topology building module is used to construct a hash-dependent directed acyclic graph corresponding to the topology structure based on the preset product structure tree data, and generate a composite fingerprint for each node.

[0036] The linkage update module is used to respond to change management events, identify the source node and recursively update the composite fingerprint of the parent node upwards along the tree structure to form an incremental update path;

[0037] The query response module is used to respond to piecework data query requests for specific department identifiers and obtain the current composite fingerprint of the target root node;

[0038] The differential calculation module is used to retrieve the current composite fingerprint from the cache. If a match is found, the pre-stored result is returned. If no match is found, a downward traversal is performed to calculate the changed branches in real time and update the cache.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. This invention employs a hash-dependent directed acyclic graph combined with an incremental update path strategy, effectively solving the problem of full recalculation during large-scale product structure changes. By recursively updating only the path from the affected source node to the root node, the computational complexity is compressed from the entire tree scale to a local path, greatly reducing server computing power consumption and disk overhead. This ensures millisecond-level real-time response of piece-rate cost data in scenarios with frequent engineering changes, eliminating data lag between design changes and financial accounting.

[0041] 2. This invention significantly improves data query efficiency through differential calculation and cache reuse mechanism based on composite fingerprints; the system can accurately identify unchanged sub-branches and directly call pre-stored aggregation results, and only perform real-time calculation on branches with fingerprint changes; this dynamically constructed hybrid mode of calculation and reuse avoids a large number of repetitive recursive accumulation operations, and greatly improves the throughput of the system when dealing with high-concurrency queries while ensuring the absolute real-time nature of the data.

[0042] 3. This invention utilizes a composite fingerprint generation technology that integrates geometric attributes, multi-dimensional piece-rate vectors, and child node sequences to achieve keen capture of cross-departmental multi-dimensional data changes. Whether it is a geometric fine-tuning of parts, a change in assembly quantity, or a unit price adjustment in a specific workshop, it will trigger a drastic change in hash value and force the upper-level cache to become invalid. This mechanism fundamentally eliminates the risk of missed calculations caused by fragmented data dimensions and ensures that every piece-rate cost strictly corresponds to the current valid design version.

[0043] 4. This invention adopts a content-addressable key-value pair storage architecture and historical root fingerprint backtracking technology to achieve efficient storage and auditing. This architecture naturally supports cross-product data deduplication and sharing, significantly saving storage space. At the same time, only the root node fingerprint at a historical moment needs to be stored to reconstruct a complete historical data view using a hash chain, providing enterprises with a low-cost, tamper-proof means of tracing historical status, meeting the stringent requirements of financial auditing and quality traceability. Attached Figure Description

[0044] The present invention will be further explained below with reference to the accompanying drawings and embodiments:

[0045] Figure 1 This is a flowchart of the method of the present invention;

[0046] Figure 2 This is a structural diagram of the system of the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0048] Example 1:

[0049] Please see Figure 1 A method for integrating and querying departmental piecework data with tree-structured node linkage, comprising:

[0050] Based on the preset product structure tree data, a hash-dependent directed acyclic graph corresponding to the topology is constructed. Each node in the hash-dependent directed acyclic graph stores a composite fingerprint and the plaintext original data of the geometric attribute data and multi-dimensional piece-count attribute vector on which the fingerprint is constructed. The composite fingerprint is calculated and generated based on the node's geometric attribute data, multi-dimensional piece-count attribute vector, assembly quantity of child nodes, and the composite fingerprint combination of all child nodes of the node.

[0051] In response to a change management event for the product tree structure, the affected source node is identified, and the composite fingerprint of the parent node is recursively updated only upwards along the tree structure until the root node, forming an incremental update path.

[0052] In response to a piecework data query request targeting a specific department, obtain the current composite fingerprint of the target root node;

[0053] Based on the current composite fingerprint, a differential calculation process is performed in a preset cache library, including:

[0054] Step 1: Retrieve the current composite fingerprint in the cache library. If the search is successful, further match the unique identifier of the target node. If the match is successful, directly return the pre-stored aggregation result mapped in the cache library.

[0055] Step 2: If the search fails, traverse downwards along the hash-dependent directed acyclic graph. For sub-branches with composite fingerprint mappings in the cache, determine that the fingerprint has not changed and directly call the pre-stored aggregation result. For sub-branches without composite fingerprint mappings in the cache, determine that the fingerprint has changed and perform real-time data aggregation calculation to generate a new aggregation result.

[0056] Step 3: Establish a mapping relationship between the new aggregation result and the corresponding current composite fingerprint, and write it into the cache library for subsequent query calls.

[0057] This embodiment details the construction and execution process of the aforementioned tree-like node linkage logic in a complex product lifecycle management environment. The system does not operate directly on the physical BOM table, but instead constructs a logically hash-dependent directed acyclic graph (DAG) using memory mapping technology. This data structure originates from a topological mirror of the preset product structure tree data, and its physical meaning is a cryptographic hash pointer connection. The variant structure is constructed as follows: the system performs a deep traversal of the product tree structure, identifies parts with the same physical attributes, instantiates only one corresponding graph node in memory, and establishes a pointing relationship by storing the composite fingerprint of the child node, i.e., the hash value, in the parent node as a logical pointer, thereby compressing the tree structure into a directed acyclic graph structure, aiming to transform hierarchical dependencies into encrypted dependencies.

[0058] Based on this, the composite fingerprint generated by the system for each node is not only a unique identifier but also a state summary. The composite fingerprint originates from the geometric attributes, piece attributes, and hash calculation results of the child node fingerprints of the node. Its physical meaning is a digital signature representing the current physical form, value attributes, and assembly structure of the component. When a change occurs, the system utilizes the unidirectional dependency characteristic of the Hash-DAG graph to trigger only the recalculation of the affected path, rather than a full tree traversal. During the query phase, the system uses the uniqueness of the fingerprint to perform a full hit check or differential traversal in the cache. This mechanism transforms the traditional recursive summation algorithm into a hash collision and local repair process.

[0059] In complex equipment manufacturing scenarios with hundreds of thousands of parts and frequent engineering changes, this method compresses the computational complexity from the full tree scale to the change path depth, achieving millisecond-level real-time response of piece-rate cost data. This completely solves the data lag problem between design changes and financial accounting, ensuring that the calculation of each piece-rate wage strictly corresponds to the current valid design version.

[0060] Example 2:

[0061] Composite fingerprints are generated by combining the geometric attribute data of a node, a multidimensional piece-counting attribute vector, and the composite fingerprints of all its child nodes, including:

[0062] Retrieve the geometric attribute identifier data of the current node;

[0063] Obtain piece-rate price data for the current node under different departmental dimensions, and construct a sparse attribute vector;

[0064] Obtain the composite fingerprints of all direct child nodes of the current node and perform sequence combination processing;

[0065] The geometric attribute identification data, the sparse attribute vector, the child node fingerprint after sequence combination processing, and the corresponding assembly quantity are concatenated, and the composite fingerprint is generated by a preset hash algorithm.

[0066] This embodiment provides a mathematical definition of the generation mechanism of composite fingerprints, aiming to construct a sensitive hash function that exhibits an avalanche effect to any minor change. The system specifically executes the following operation process: extracting geometric attribute identification data from the CAD integration interface of the PLM system; geometric attribute identification data: sourced from the geometric feature extraction algorithm of the 3D model, with the physical meaning being the MD5 or SHA value representing the physical shape version of the component, used to anchor the design state; extracting sparse attribute vectors from the ERP or MES system;

[0067] Sparse attribute vector: Sourced from the piece-rate unit price database of each production department, its physical meaning is the set of value attributes of this node under different departmental dimensions, such as {Workshop A: 10 yuan, Workshop B: 0 yuan}; The system collects the hash values ​​of all subordinate child nodes of this node and the usage quantity of each child node in the current assembly structure, and performs sequence combination processing; Sequence combination processing: Sourced from the binary concatenation of child node fingerprints sorted in lexicographical order, its physical meaning is to lock the unique order of the assembly structure; The above three sets of data streams are merged and input into the SHA-256 algorithm to generate the final composite fingerprint, the formula of which is expressed as:

[0068] ;

[0069] in, This represents the composite fingerprint generated by the current node; This indicates a preset hash algorithm; in this embodiment, the SHA-256 algorithm is preferred. This represents geometric attribute identification data, used to anchor the design status; This represents a sparse attribute vector, used to characterize value attributes under different departmental dimensions; This indicates the total number of child nodes of the current node; Indicates the sorted order of the first... A composite fingerprint of each child node; Indicates the first The number of child nodes assembled; The default internal separator is an underscore (_). The preset separator between nodes is the hash symbol (#) in this embodiment; Represents string concatenation operation; symbol This represents a direct concatenation operation of binary data; symbol This represents an ordered concatenation operation of strings, that is, strictly following the sorted indices. Concatenate the child node information sequentially; changing the concatenation order is strictly prohibited.

[0070] To eliminate interference from file metadata, such as creation time and author information, on fingerprint uniqueness, the system performs geometric topology normalization. It should be noted that, considering the significant computational cost of this step, this normalization process is configured as a preprocessing mechanism, executed asynchronously only once during the component model import or version release phase. The generated standardized geometric data stream is persistently stored as static attributes, and this static data is directly called when generating composite fingerprints, without real-time recalculation. All vertex coordinates and face normals of the 3D model are extracted, and their values ​​are converted to fixed precision according to the IEEE 754 standard, specifically retaining 8 significant decimal places, padding with zeros if necessary, and then processed according to spatial coordinates (…). , , A deterministic sort is performed, with the sorting rule defined as follows: first compare the X-coordinate values; if they are the same, then compare the Y-coordinates; if they are still the same, then compare the X-coordinates. The coordinates are all arranged in ascending order, concatenated into a pure geometric data stream, and then hashed.

[0071] This represents the binary data after deterministic serialization of the sparse attribute vector. The specific algorithm is as follows: extract all non-empty department dimension key-value pairs from the attribute vector, sort them in ascending order according to the lexicographical order of the ASCII codes of the department identifier strings, and convert them into binary data. of The hash input is formatted as a -8 string and concatenated with semicolons, and finally converted into a binary stream. This ensures that the hash input generated by the same set of attributes is unique and is not affected by the order of database reading.

[0072] The system represents the fingerprint sequence of child nodes. Ignoring the physical assembly order, the system combines the composite fingerprint of each child node with its corresponding assembly quantity into a string. The combination format is defined as fingerprint value + preset internal separator + assembly quantity. The combined string is sorted in ascending order according to ASCII lexicographical order and then concatenated into a binary sequence using the preset node separator. This ensures that the hash value can be changed even when the quantity of parts changes or different combinations of child nodes are used.

[0073] This multi-dimensional fingerprint generation mechanism, in precision manufacturing collaborative scenarios, can keenly detect hidden changes such as unchanged design but adjusted unit price or unchanged unit price but geometric fine-tuning. By drastic changes in hash value, it forcibly triggers the cache invalidation of upper-level nodes, fundamentally eliminating the risk of omissions or miscalculations in piecework due to fragmented data dimensions.

[0074] Example 3:

[0075] In response to change management events related to the product structure tree, including:

[0076] Receive engineering change instructions from the change management module, the instructions including the identifier of the change node and the changed attribute value;

[0077] The changed node is located based on the identifier, and the composite fingerprint of the node is recalculated;

[0078] Lock the parent node of the source node, recalculate the composite fingerprint of the parent node using the updated composite fingerprint of the source node, and iterate upwards until the root node of the hash-dependent directed acyclic graph is reached.

[0079] The composite fingerprints of the remaining branch nodes that are not on the incremental update path remain unchanged.

[0080] This embodiment details the bubble-style incremental update logic triggered by change events. When an engineering change instruction is issued, the system parses the change node identifier and the changed attribute value in the instruction. The changed attribute value originates from the input stream of the change management module and its physical meaning is the original variable that triggered this recalculation, such as the corrected piece rate price. The system locates the source node in the hash-dependent directed acyclic graph and immediately recalculates its fingerprint using the formula in Embodiment 2. The system retrieves and locks all direct parent nodes that reference the source node through the reverse reference index, i.e., all incoming edge nodes in the DAG graph. For each parent node, the old fingerprint is replaced with the new source node fingerprint, and the parent node fingerprint is recalculated in combination with the parent node's own attributes. This process is like a bubble rising, passing upwards layer by layer until the root node is updated. During this period, the system strictly implements the branch isolation strategy, i.e., for sibling nodes or unrelated branches that are not on the incremental update path, the system completely skips the calculation and maintains their original fingerprint state.

[0081] In the maintenance scenario of ultra-large-scale BOM structure, this embodiment limits system resource consumption to an extremely narrow update band by accurately locking the affected topology path, avoiding the full table lock-up or cascading update storm that may be caused by traditional database triggers, so that the system can still maintain extremely high throughput when handling high-frequency concurrent changes.

[0082] Example 4:

[0083] Step 2 involves real-time data aggregation calculations for sub-branches where fingerprints have changed, including:

[0084] Nodes for which no composite fingerprint mapping is found in the cache are identified and marked as nodes to be computed;

[0085] Based on the specific department identifier in the query request, extract the corresponding piece-rate unit price value from the attribute vector of the node to be calculated;

[0086] Recursively obtain the aggregation results of all sub-branches of the node to be calculated, read the assembly quantity corresponding to the sub-branch, calculate the product of the sub-branch aggregation result and the assembly quantity, and arithmetically sum the sum of the product of the piece rate unit price and all sub-branches to generate the new aggregation result.

[0087] Step 2 involves directly calling the pre-stored aggregation result for sub-branches where the fingerprint has not changed, including:

[0088] During the downward traversal, check whether the composite fingerprint of the current child node exists in the cache.

[0089] If a unique identifier of a node exists and is recorded in a mapping record corresponding to the composite fingerprint that is consistent with the current child node, then the traversal operation of the child node and all its subordinate child nodes shall be terminated immediately.

[0090] The aggregated value corresponding to the composite fingerprint of the child node in the cache library is directly read as the calculation result of the branch.

[0091] This embodiment details the computation-reuse binary decision logic within the differential computation engine. When traversing each level of the hash DAG, the system performs real-time cache probing: if the fingerprint of the current node is missing in the cache, the system determines that the node is to be computed and enters the real-time aggregation process. In this process, the system uses the specific department identifier in the query request as a filter key to extract the unit price of the current dimension from the node's attribute vector and recursively calls the computation results of child nodes for accumulation. This recursive process specifically uses a post-order traversal algorithm, where the system first descends to the lowest level of the topology, calculates the aggregation results of child nodes, and returns layer by layer upwards to the parent node for accumulation. The termination condition for the recursion is set as follows: when the traversed node is a leaf node, the system directly returns the node's own piece-rate unit price; or when a cache-hit intermediate node is encountered, the downward probe stops.

[0092] The product of the sub-branch aggregation result and the number of assemblies is calculated based on the following formula:

[0093] ;

[0094] Among them, superscript This represents the specific department identifier specified in the current query request, such as the final assembly workshop or painting workshop. The system only extracts the unit price data under this dimension for calculation. The piece-rate price for the current node is extracted from the sparse attribute vector. For the recursive obtained first The aggregation results of each sub-branch The corresponding assembly quantity is consistent with the symbol defined in Example 2. The sum of the products of the two is used as the new aggregation result.

[0095] Specific department identifier: originates from user query requests, and its physical meaning is a dimension filter for data aggregation, such as the final assembly workshop; conversely, in response to the existence of the fingerprint of the current node in the cache, the system performs a computation truncation operation, immediately stops the downward recursive probing, and directly returns the value in the cache as the return value of this branch to the upper-level node; this mechanism is actually dynamically constructing a temporary computation tree composed of a mixture of real-time computing nodes and cache reuse nodes;

[0096] This technical solution cleverly utilizes [the following] when dealing with cost accounting scenarios for large and complex equipment. Its structural characteristics enable zero-computation, second-level reuse of large substructures that have not changed, and only incur computational costs for local nodes affected by changes. This greatly reduces the CPU computing power overhead of the server while ensuring absolute real-time data performance.

[0097] Example 5:

[0098] The caching library uses a key-value pair mapping structure to store data, including:

[0099] The hash value of the composite fingerprint is used as the key; the total aggregate cost of the corresponding node under different departmental dimensions is used as the value.

[0100] The cache library is configured with a write verification mechanism based on hash collision detection.

[0101] This embodiment constructs a high-efficiency storage architecture based on content addressing. The cache library abandons the traditional relational database table structure and instead adopts a high-performance key-value pair storage engine. Here, the key is a composite fingerprint generated by the SHA-256 algorithm, physically representing a unique content index of the data; the value is the aggregated output of the differential calculation module, physically representing a snapshot of the total cost of the node and all its child nodes across various departmental dimensions. Furthermore, the value's data structure additionally encapsulates the original node's unique identifier UID, such as Part_Number or UUID, as strong verification metadata used to resolve identity verification in case of hash collisions. Based on this, to ensure absolute data reliability, the system performs hash collision detection during writing. Hash collision detection originates from the comparison logic before writing, physically representing a security defense mechanism to prevent different data from generating the same hash value under extremely low probability conditions.

[0102] The specific execution logic is as follows: When a write operation is triggered, the system checks whether the target key already exists in the cache; if it does, it reads the UID of the value already stored in the cache and compares it with the UID of the value to be written.

[0103] If the two UIDs are inconsistent, it is determined to be a hash collision, and the system uses chaining to handle the conflict: cache library The field stores the pointer to the head of the linked list. The system constructs a linked list node containing the new UID, aggregated data, and a Next pointer, and appends it to the tail of the linked list corresponding to that key, thereby avoiding data overwriting.

[0104] If the two UIDs are the same, it is confirmed as an idempotent write, and the access timestamp of the entry is directly updated without performing a data overwrite operation. When reading, the system also performs a dual verification mechanism based on hash value and UID to ensure the accuracy of the returned data.

[0105] In PLM data center scenarios with multiple projects and versions coexisting, this storage architecture naturally achieves cross-product data deduplication and sharing. This means that the same standard parts or components used in different products only need to be stored once, significantly saving storage space and keeping the time complexity of query retrieval constant. level.

[0106] Example 6:

[0107] This method also includes a historical data backtracking step:

[0108] Store the composite fingerprint of the root node at a historical moment;

[0109] In response to a historical audit request, the root node composite fingerprint of the historical moment is retrieved from the cache library to reconstruct a complete piecework data view for that historical moment, in order to verify data consistency.

[0110] This embodiment leverages the immutability of hash chains to achieve a zero-cost historical state snapshot function. At each data release or archiving node, the system only needs to persistently store the root node composite fingerprint at that time. The root node composite fingerprint originates from the calculated value of the top-level node of the hash DAG at that moment, and its physical meaning is the complete state anchor point of the entire product structure tree at a specific point in time. When a historical audit request is received from the audit department, the system does not rely on a large historical backup database. Instead, it directly uses the root fingerprint as an index and, through fingerprint reference relationships in the cache database, reconstructs the child node structure and cost data layer by layer, like a zipper. As long as the underlying data blocks in the cache database are not physically cleared, the piece-rate data view at that historical moment can be completely reconstructed.

[0111] In enterprise financial auditing and quality traceability scenarios, this solution can represent the entire database status by storing only a hash value. This not only reduces the storage cost of historical data by several orders of magnitude, but also provides a mathematically verifiable proof of data tamper-proof, ensuring the authenticity and legal validity of historical piecework vouchers.

[0112] Example 7:

[0113] Please see Figure 2 A tree-structured, interconnected departmental piecework data integration and query system, comprising:

[0114] The topology building module is used to construct a hash-dependent directed acyclic graph corresponding to the topology structure based on the preset product structure tree data, and generate a composite fingerprint for each node.

[0115] The linkage update module is used to respond to change management events, identify the source node and recursively update the composite fingerprint of the parent node upwards along the tree structure to form an incremental update path;

[0116] The query response module is used to respond to piecework data query requests for specific department identifiers and obtain the current composite fingerprint of the target root node;

[0117] The differential calculation module is used to retrieve the current composite fingerprint from the cache. If a match is found, the pre-stored result is returned. If no match is found, a downward traversal is performed to calculate the changed branches in real time and update the cache.

[0118] This embodiment details the hardware and software modular architecture supporting the above method. The core of the system consists of four collaborative processing units: the topology building module, as the system's initialization engine, is responsible for parsing the physical BOM into a logical Hash-DAG, and its built-in hash computing unit is dedicated to handling high-density SHA-256 operations; the linkage update module, as a background daemon process, listens for ECO messages on the change bus in real time and maintains the computation queue for incremental update paths; the query response module, as the front-end interaction interface, is responsible for parsing user intent and extracting root fingerprints; the differential calculation module, as the core scheduler, executes the logical branch judgment of table lookup and calculation, and manages the read-write consistency of the cache library; the modules exchange data through a high-speed message queue.

[0119] In enterprise-level high-concurrency application scenarios, this system architecture decouples and optimizes the pipeline between computationally intensive hash construction tasks and I / O-intensive query retrieval tasks, achieving system stability under the dual pressure of tens of thousands of concurrent user queries and frequent backend design changes, thus ensuring the high availability of piecework data services.

[0120] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A tree node linkage department association component data set integration query method, characterized in that, include: Based on the preset product structure tree data, a hash-dependent directed acyclic graph corresponding to the topology is constructed. Each node in the hash-dependent directed acyclic graph stores a composite fingerprint. The composite fingerprint is calculated and generated based on the node's geometric attribute data, multi-dimensional piece count attribute vector, assembly quantity of child nodes, and the composite fingerprint combination of all child nodes of that node. In response to a change management event for the product tree structure, the affected source node is identified, and the composite fingerprint of the parent node is recursively updated only upwards along the tree structure until the root node, forming an incremental update path. In response to a piecework data query request targeting a specific department, obtain the current composite fingerprint of the target root node; Based on the current composite fingerprint, a differential calculation process is performed in a preset cache library, including: Step 1: Retrieve the current composite fingerprint in the cache library. If the search is successful, further match the unique identifier of the target node. If the match is successful, directly return the pre-stored aggregation result mapped in the cache library. Step 2: If the search fails, traverse downwards along the hash-dependent directed acyclic graph. For sub-branches with composite fingerprint mappings in the cache, determine that the fingerprint has not changed and directly call the pre-stored aggregation result. For sub-branches without composite fingerprint mappings in the cache, determine that the fingerprint has changed and perform real-time data aggregation calculation to generate a new aggregation result. Step 3: Establish a mapping relationship between the new aggregation result and the corresponding current composite fingerprint, and write it into the cache library for subsequent query calls; The composite fingerprint is generated based on the node's geometric attribute data, multi-dimensional piece-counting attribute vector, assembly quantity of child nodes, and the composite fingerprint combination of all child nodes of that node, including: Retrieve the geometric attribute identifier data of the current node; Obtain piece-rate price data for the current node under different departmental dimensions, and construct a sparse attribute vector; Obtain the composite fingerprints of all direct child nodes of the current node and perform sequence combination processing; The geometric attribute identification data, the sparse attribute vector, the child node fingerprint after sequence combination processing, and the corresponding assembly quantity are concatenated, and the composite fingerprint is generated by a preset hash algorithm. Step 2 involves real-time data aggregation calculations for sub-branches where fingerprints have changed, including: Nodes for which no composite fingerprint mapping is found in the cache are identified and marked as nodes to be computed; Based on the specific department identifier in the query request, extract the corresponding piece-rate unit price value from the attribute vector of the node to be calculated; The aggregation results of all sub-branches of the node to be calculated are obtained recursively. The assembly quantity corresponding to the sub-branch is read, the product of the aggregation result of the sub-branch and the assembly quantity is calculated, and the sum of the product of the piece rate unit price and all sub-branches is arithmetically added to generate the new aggregation result.

2. The tree node linkage-based department association component data set integration query method according to claim 1, characterized in that, In response to a change management event for the product structure tree, the method includes: receiving an engineering change instruction from the change management module, the instruction containing an identifier of the change node and the changed attribute value; locating the source node based on the identifier and recalculating the composite fingerprint of the source node; locking the parent node of the source node, recalculating the composite fingerprint of the parent node using the updated composite fingerprint of the source node, and iterating upwards sequentially until the root node of the hash-dependent directed acyclic graph; and keeping the composite fingerprints of the remaining branch nodes not on the incremental update path unchanged.

3. The method of claim 1, wherein, Step 2 involves directly calling the pre-stored aggregation result for sub-branches where the fingerprint has not changed, including: During the downward traversal, check whether the composite fingerprint of the current child node exists in the cache. If a unique identifier of a node exists and is recorded in a mapping record corresponding to the composite fingerprint that is consistent with the current child node, then the traversal operation of the child node and all its subordinate child nodes shall be terminated immediately. The aggregated value corresponding to the composite fingerprint of the child node in the cache library is directly read as the calculation result of the branch.

4. The tree node linkage-based department association component data integration query method according to claim 1, characterized in that, The cache library uses a key-value pair mapping structure to store data, including: The hash value of the composite fingerprint is used as the key; The value is the aggregated total cost of the corresponding node across different departmental dimensions. The cache library is configured with a write verification mechanism based on hash collision detection.

5. The method for integrating and querying departmental piecework data with tree-structured node linkage according to claim 1, characterized in that, The method also includes a historical data backtracking step: Store the composite fingerprint of the root node at a historical moment; In response to a historical audit request, the root node composite fingerprint of the historical moment is retrieved from the cache library to reconstruct a complete piecework data view for that historical moment, in order to verify data consistency.

6. A tree-node linked departmental piecework data integration and query system, applied to the tree-node linked departmental piecework data integration and query method according to any one of claims 1-5, characterized in that, include: The topology building module is used to construct a hash-dependent directed acyclic graph corresponding to the topology structure based on the preset product structure tree data, and generate a composite fingerprint for each node. The linkage update module is used to respond to change management events, identify the source node and recursively update the composite fingerprint of the parent node upwards along the tree structure to form an incremental update path; The query response module is used to respond to piecework data query requests for specific department identifiers and obtain the current composite fingerprint of the target root node; The differential calculation module is used to retrieve the current composite fingerprint from the cache. If a match is found, the pre-stored result is returned. If no match is found, a downward traversal is performed to calculate the changed branches in real time and update the cache.