A production-based data management method, medium, and system based on a scalable data model
By employing a hybrid storage architecture and cross-database federated query technology, the problems of low query efficiency and difficulty in ensuring data consistency in traditional production basic data management systems have been solved, achieving efficient and stable production data management and adapting to the dynamic expansion needs of assembly and machining production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NENGKE CLOUD FLAG SOFTWARE (DONGGUAN) CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
AI Technical Summary
In traditional production basic data management systems, the separate storage of fixed attributes and dynamically extended attributes results in low cross-database query efficiency and difficulty in ensuring data consistency. Especially in assembly and machining production scenarios, existing technologies cannot flexibly adapt to dynamic expansion requirements, leading to a decrease in system stability.
A hybrid storage architecture is adopted, storing fixed attributes in a relational database and dynamically extended attributes in a document database. Cross-database joint queries are enabled through a unified data access interface. Combined with a material genealogy database, a distributed locking mechanism, a streaming data processing platform, and an adaptive Kalman filter prediction algorithm, efficient data management and real-time production monitoring are achieved.
It improves cross-database query efficiency, ensures data consistency, enhances system stability and adaptability, and enables rapid response to dynamic needs in assembly and machining production scenarios, reducing query latency and data redundancy.
Smart Images

Figure CN122132406A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of production basic data management technology, and more specifically, relates to a production basic data management method, medium, and system based on a scalable data model. Background Technology
[0002] In the field of manufacturing production management, traditional production basic data management systems use a single relational database to store all information such as product codes, process routes, and material attributes, organizing data through a predefined fixed table structure. In current assembly and machining production scenarios, due to the differentiated process parameters and quality inspection standards of different product types, the fixed schema of traditional relational databases is difficult to flexibly adapt to dynamic expansion needs, leading to frequent table structure changes that affect system stability. Existing technologies attempt to use wide table designs or the EAV entity attribute value model to support extended attribute storage. However, wide table designs result in a large number of null values wasting storage space, and query performance decreases as the number of columns increases. While the EAV model supports flexible expansion, multi-table join queries are complex and index optimization is difficult. In other words, existing technologies suffer from the technical problem of low cross-database query efficiency and difficulty in ensuring data consistency after separating the dynamic extended attributes and fixed attributes of production basic data for storage. Summary of the Invention
[0003] In view of this, the present invention provides a production basic data management method, medium and system based on a scalable data model, which can solve the technical problems of low cross-database query efficiency and difficulty in ensuring data consistency after separating the dynamic extended attributes and fixed attributes of production basic data in the prior art.
[0004] This invention is implemented as follows: The first aspect of this invention provides a production basic data management method based on a scalable data model, including establishing a production data management system with a hybrid storage architecture. Core fixed attributes such as product codes, process routes, and material properties are stored in a relational database; dynamically extended attributes such as product types, process parameters, and quality inspection standards are stored in a document database. Cross-database joint queries are achieved through a unified data access interface. A material genealogy graph database is constructed, using unique batch identifiers as nodes to establish a directed graph structure to record material flow relationships. Batch traceability queries are performed using a bidirectional breadth-first search algorithm combined with a spatiotemporal topology compression algorithm. A distributed inventory management system is deployed. For material requisition operations, a distributed locking mechanism is used to lock inventory records, and an atomic operation script is used to complete inventory quantity checks and deductions. A streaming data processing platform is established to collect sensor data from production equipment, perform micro-batch aggregation processing, calculate real-time production takt time using a sliding window mechanism, predict future takt time trends using an adaptive Kalman filter prediction algorithm, and generate material delivery lead time. Product attributes, process parameters, and material flow records are input into the production data fusion model to output data model configuration schemes and material delivery plan adjustment suggestions. An anomaly detection and adaptive adjustment mechanism is established to trigger corresponding optimization strategies based on extended attribute queries for response time, inventory concurrency conflict rate, and takt time prediction error.
[0005] In the hybrid storage architecture, the relational database stores the product basic information table, the process route table, and the material master data table, while the document database uses a nested document pattern to store the dynamically extended attribute set corresponding to each product code and organizes it in key-value pairs.
[0006] The document database supports fast retrieval by extended attribute name and extended attribute value through inverted index, and uses a sharding strategy to distribute the dynamic extended attribute sets of different product types to different storage nodes.
[0007] The unified data access interface receives query requests, parses the required core fixed attributes and dynamically extended attributes, retrieves data from relational databases and document databases respectively, and then merges and returns the results.
[0008] The node attributes of the directed graph structure in the material genealogy database include the unique identifier of the material batch, the material code, and the batch generation time, while the edge attributes include the process number, the transfer timestamp, the operator identifier, and the equipment number.
[0009] In batch traceability query, the process starts from the node corresponding to the unique identifier of the target material batch and traces upstream along the inbound edge or downstream along the outbound edge. A Bloom filter is used to quickly determine whether the unique identifier of a material batch is in the traceability path.
[0010] Among them, the bidirectional breadth-first search algorithm expands the search range simultaneously from the starting material batch unique identifier and the ending material batch unique identifier until the search frontiers in the two directions meet.
[0011] The distributed lock is implemented using a Redis distributed cache database. It maintains a version number field for each inventory record. Before the material requisition operation, the distributed lock locks the inventory record identifier and reads the current inventory quantity and version number fields.
[0012] The atomic operation script is written in Lua scripting language and atomically executes the complete process of checking inventory quantity, deducting inventory quantity, and updating the version number field in the Redis distributed cache database.
[0013] The streaming data processing platform is built on the Apache Flink streaming computing framework. After the sensor data from the production equipment enters the streaming data processing platform, it is grouped by equipment number and a sliding window mechanism is used to set the window length to 300 seconds and the sliding step to 60 seconds.
[0014] Within each sliding window, the machine uptime, number of processed parts, and processing time per part are counted as the real-time production cycle time. The real-time production cycle time sequence of multiple consecutive sliding windows is then input into an adaptive Kalman filter for state estimation.
[0015] The input layer of the production data fusion model receives product type codes, process route identifiers, and material flow time sequence features. These are then converted into dense vectors by the feature embedding layer and captured by a multi-head self-attention module to capture the association patterns between different product type codes.
[0016] Specifically, the feature decorrelation regularization term is used to constrain the correlation between attention heads, prompting different attention heads to learn complementary feature representations. The feature fusion layer adaptively fuses the output feature vectors of multiple attention heads through a gating mechanism.
[0017] Among them, the spatiotemporal topology compression algorithm groups material movement events according to a 300-second time window, identifies flow patterns that occur more than 10 times in each time window and extracts them as sub-graph templates.
[0018] Specifically, a graph isomorphism detection algorithm is used to compare the structural similarity between the flow rotor graphs of different time windows and the existing subgraph templates. When the isomorphism similarity exceeds 0.85, the flow rotor graph is marked as a template instance and only the difference attributes between it and the subgraph template are recorded.
[0019] The adaptive Kalman filter prediction algorithm models the real-time production beat as a state variable, which includes the beat mean, beat change rate, and periodic fluctuation component. When the standard deviation of the residuals for five consecutive sliding windows exceeds twice the standard deviation of the historical residuals, it is judged as an abnormal fluctuation and automatically switches to the H∞ filter.
[0020] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the aforementioned production basic data management method based on a scalable data model.
[0021] A third aspect of the present invention provides a production-based data management system based on a scalable data model, comprising the aforementioned computer-readable storage medium, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
[0022] This invention addresses the low query efficiency of traditional single-database architectures when handling heterogeneous data by establishing a hybrid storage architecture that stores core fixed attributes in a relational database and dynamically extended attributes in a document database, and deploying a unified data access interface to enable cross-database join queries. The hybrid storage architecture leverages the transaction guarantees of relational databases to maintain strong consistency of fixed attributes, while utilizing the nested document schema and inverted indexes of document databases to support flexible storage and fast retrieval of dynamically extended attributes. The unified data access interface parses query requests, retrieves data from both databases, and merges the results, avoiding the multi-table join overhead of traditional EAV models. A caching layer preloads dynamically extended attribute sets encoded for frequently accessed products, reducing database access frequency. A sharding strategy distributes extended attributes of different product types across different storage nodes, improving concurrent query throughput. In summary, this invention solves the technical problems mentioned in the background art, such as low cross-database query efficiency and difficulty in ensuring data consistency after separating the storage of dynamically extended and fixed attributes of production basic data. Attached Figure Description
[0023] Figure 1 This is a flowchart of the method of the present invention.
[0024] Figure 2 This is a schematic diagram of the relationships between nodes and edges in a material genealogy database.
[0025] Figure 3 A flowchart for calculating real-time production cycle time using a sliding window in a streaming data processing platform. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0027] like Figure 1 The diagram shown is a flowchart of a production basic data management method based on a scalable data model provided in the first aspect of this invention. This method includes the following steps:
[0028] S01. Establish a production data management system with a hybrid storage architecture. Store the core fixed attributes of product codes, process routes, and material attributes in a relational database, and store the dynamic extended attributes of product types, process parameters, and quality inspection standards in a document database. Enable cross-database joint queries through a unified data access interface.
[0029] S02. Construct a material genealogy database, establish a directed graph structure with the unique identifier of material batch as the node, record the unique identifier of upstream material batch, unique identifier of downstream material batch, process number, and flow timestamp of each material flow, and use a bidirectional breadth-first search algorithm combined with a spatiotemporal topology compression algorithm to perform batch traceability query.
[0030] S03. Deploy a distributed inventory management system. For each material requisition operation, use a distributed lock mechanism to lock the corresponding inventory record. Use atomic operation scripts to complete inventory quantity checks and deductions, and send the inventory quantity deduction results to a message queue for asynchronous confirmation.
[0031] S04. Establish a streaming data processing platform, collect sensor data from production equipment and perform micro-batch aggregation processing, calculate real-time production cycle through a sliding window mechanism, and use the adaptive Kalman filter prediction algorithm of production cycle to predict future cycle trends and generate material delivery lead time.
[0032] S05. Input product attributes, process parameters, and material flow records into the production data fusion model. The production data fusion model outputs an optimized data model configuration scheme and material distribution plan adjustment suggestions. Adjust the extended attribute index strategy according to the data model configuration scheme and adjust the line-side inventory level threshold according to the material distribution plan adjustment suggestions.
[0033] S06. Establish an anomaly detection and adaptive adjustment mechanism. When the response time of extended attribute query exceeds 500 milliseconds, trigger cache preheating and index reconstruction. When the inventory concurrency conflict rate exceeds 5%, dynamically increase the lock granularity. When the cycle prediction error exceeds 15%, switch to a robust filter.
[0034] The hybrid storage architecture includes a relational database storing a product basic information table, a process route table, and a material master data table. The product basic information table includes a product code field and a product name field. The process route table includes a process route identifier field and a process number sequence field. The material master data table includes a material code field and a material attribute field. The document database in the hybrid storage architecture uses a nested document schema to store a set of dynamically extended attributes corresponding to each product code. The dynamically extended attribute set is organized in key-value pairs and supports fast retrieval by extended attribute name and extended attribute value through an inverted index. A sharding strategy is used to distribute the dynamically extended attribute sets of different product types to different storage nodes. A caching layer caches the dynamically extended attribute sets of hot product codes to reduce the number of database accesses. The unified data access interface receives query requests, parses the required core fixed attributes and dynamically extended attributes, retrieves data from the relational database and document database respectively, and then merges and returns the results.
[0035] The directed graph structure in the material genealogy database includes node attributes such as unique batch identifier, material code, and batch generation time. The edge attributes include process number, transfer timestamp, operator identifier, and equipment number. During batch traceability queries, the system starts from the node corresponding to the unique batch identifier of the target material and traces upstream along the incoming edge or downstream along the outgoing edge. A Bloom filter is used to quickly determine whether a unique batch identifier of a material is in the traceability path. Pre-computation cache is used to store intermediate results of high-frequency traceability paths. A bidirectional breadth-first search algorithm expands the search range simultaneously from the unique batch identifier of the starting material and the unique batch identifier of the ending material until the search frontiers in both directions meet. The Bloom filter maps the unique batch identifier of the material to multiple positions in a bit array using multiple hash functions and marks them as 1. During the query, it checks whether all mapped positions are 1 to determine whether the element may exist.
[0036] The distributed lock is implemented using a Redis distributed cache database. A version number field is maintained for each inventory record. Before a material requisition operation, the distributed lock is used to lock the inventory record identifier and read the current inventory quantity and version number field. The current inventory quantity is compared to the requisition quantity requirement. If the requirement is met, the inventory quantity is deducted and the version number field is incremented. Simultaneously, the distributed lock is released, and the inventory quantity deduction result, containing the material batch unique identifier, requisition quantity, and version number fields, is sent to a message queue. The consumer asynchronously updates the material flow record table and the line-side inventory table. If the current inventory quantity is insufficient or there is a version number field conflict, the operation is rolled back and the caller is notified to retry. The atomic operation script is written in Lua scripting language and atomically executes the complete process of inventory quantity checking, inventory quantity deduction, and version number field update in the Redis distributed cache database.
[0037] The streaming data processing platform is built on the Apache Flink streaming computing framework. The sensor data of the production equipment includes equipment number, timestamp, operating status identifier, and processing parameter values. After the sensor data of the production equipment enters the streaming data processing platform, it is grouped by equipment number. A sliding window mechanism is used, with a window length of 300 seconds and a sliding step of 60 seconds. In each sliding window, the equipment start-up time and the number of processed parts are counted. The processing time of a single part is calculated as the real-time production cycle time. The real-time production cycle time sequence of multiple consecutive sliding windows is input into an adaptive Kalman filter for state estimation. The predicted cycle time value output by the adaptive Kalman filter is used to calculate the material consumption rate and material delivery lead time. The material consumption rate is calculated by multiplying the reciprocal of the predicted cycle time value by the material consumption amount per part. The material delivery lead time is calculated by dividing the safety level of the line-side inventory by the material consumption rate.
[0038] The structure of the production data fusion model is as follows: the input layer receives product type codes, process route identifiers, and material flow time sequence features; the feature embedding layer converts the product type codes and process route identifiers into dense vectors; the multi-head self-attention module in the feature-based decorrelation representation learning enhancement framework captures the correlation patterns between different product type codes; the feature decorrelation regularization term constrains the correlation between attention heads, prompting different attention heads to learn complementary feature representations; the feature fusion layer adaptively fuses the output feature vectors of multiple attention heads through a gating mechanism; and the decoding layer outputs a data model configuration scheme and a material distribution plan adjustment suggestion. The data model configuration scheme includes extended attribute index field selection, sharding key setting, and caching strategy parameters; and the material distribution plan adjustment suggestion includes the upper limit value of line-side inventory, the lower limit value of line-side inventory, the delivery batch size, and the delivery trigger threshold.
[0039] The steps for establishing the training dataset for the production data fusion model include collecting historical production work order data, material inbound and outbound records, and production line operation logs; extracting the product type code, process route identifier, and bill of materials for each historical production work order; statistically analyzing the frequency of extended attribute queries, extended attribute query response time, material delivery frequency, and delivery delay time during the execution of historical production work orders; labeling the performance indicators of the data model configuration scheme and the completeness rate of material delivery plan adjustment suggestions; constructing sample pairs containing product type codes, process route identifiers, material flow time sequence characteristics, and labeling results; and dividing the training set and validation set in an 8:2 ratio. The material flow time sequence characteristics are constructed by extracting the unique identifier sequence of material batches, the process number sequence, and the flow time interval sequence after sorting the material flow records by timestamp.
[0040] The training steps of the production data fusion model include initializing model parameters, performing forward propagation to calculate the predicted output, using the mean squared error loss function to measure the deviation between the predicted value and the true value of the data model configuration scheme, using the cross-entropy loss function to measure the accuracy of the classification prediction of material distribution plan adjustment suggestions, introducing a feature decorrelation regularization term to calculate the Pearson correlation coefficient between the output feature vectors of different attention heads and adding it to the total loss function, calculating the gradient through the backpropagation algorithm and updating the model parameters using an adaptive learning rate optimizer, evaluating the model performance on the validation set and using an early stopping strategy to prevent overfitting.
[0041] The feature decorrelation regularization term calculates the Pearson correlation coefficient matrix between the column vectors of the feature vector matrices output by each attention head in the multi-head self-attention module. The sum of the absolute values of the off-diagonal elements of the Pearson correlation coefficient matrix is added as a penalty term to the total loss function. During optimization, minimizing this penalty term ensures that the feature vectors learned by different attention heads are as statistically independent as possible, avoiding information redundancy caused by multiple attention heads focusing on similar feature patterns. The feature decorrelation-based representation learning enhancement framework guides the production data fusion model to learn diverse feature representations through the feature decorrelation regularization term mechanism. This makes the fused feature vectors output by the feature fusion layer contain richer discriminative information, improving the generalization ability of the production data fusion model for different product type codes and process route identifiers. When faced with new product type codes or changes in process route identifiers, it can more accurately predict appropriate data model configuration schemes and material distribution plan adjustment suggestions, reducing prediction bias caused by single feature representations and enhancing the adaptability and robustness of the system in assembly and machining production scenarios.
[0042] The number of attention heads in the multi-head self-attention module is determined based on the number of currently managed product types, the process route complexity coefficient, and the average material flow depth. The number of product types is obtained by counting the total number of records for different product codes in the basic product information table. The process route complexity coefficient is calculated by counting the ratio of the average number of processes in the process route number sequence field to the standard number of processes. The average material flow depth is obtained by counting the average path length from the unique identifier of the raw material batch to the unique identifier of the finished product batch in the material genealogy database. When the number of product types exceeds 100, the number of attention heads is set to 16; when the number of product types is between 50 and 100, the number of attention heads is set to 8; when the number of product types is less than 50, the number of attention heads is set to 4; when the process route complexity coefficient is greater than 2 or the average material flow depth exceeds 10 levels, the number of attention heads is increased by 50% based on the baseline value.
[0043] The spatiotemporal topology compression algorithm groups material movement events into 300-second time windows. Within each time window, it identifies flow patterns that occur more than 10 times and extracts them as subgraph templates. The subgraph templates contain unique material batch identifiers for source nodes and target nodes, as well as edge attribute features. A graph isomorphism detection algorithm is used to compare the structural similarity between the flow rotor graphs of different time windows and existing subgraph templates. When the isomorphism similarity exceeds 0.85, the flow rotor graph is marked as a template instance, and only the differences from the subgraph template are recorded. A spatial locality hash function is introduced to map the three-dimensional coordinates of the material storage location into hash values. Nodes with the same hash value are clustered into the same spatial region. For the continuous dwell state of materials in the same spatial region, run-length encoding is used to record the state type and duration. The compressed topology structure supports the rapid reconstruction of the complete flow path through subgraph template indexing and difference attribute decoding. The graph isomorphism detection algorithm uses the VF2 algorithm to determine whether two graph structures are isomorphic, and the spatial locality hash function uses the Geohash encoding algorithm to encode the three-dimensional coordinates into string-form hash values.
[0044] The adaptive Kalman filter prediction algorithm for production beats models the real-time production beats as state variables, which include the beat mean, beat rate of change, and periodic fluctuation components. A state transition equation is established to describe the evolution of the real-time production beats within a continuous sliding window. An observation equation is established to correlate the actual measured real-time production beats with the state variables. The state transition noise covariance matrix and the observation noise covariance matrix are estimated using historical real-time production beat data. The adaptive Kalman filter updates the state based on the current state estimate and the new observed real-time production beats, and calculates the residual between the predicted beat value and the actual real-time production beat. When the standard deviation of the residuals for five consecutive sliding windows exceeds twice the standard deviation of the historical residuals, it is judged as an abnormal fluctuation. The system automatically switches to the H∞ filter to enhance the ability to suppress abnormal disturbances. It integrates multi-source data such as equipment status sensor data, material consumption records, and personnel operation logs corresponding to the equipment number to perform joint state estimation, thereby improving the accuracy of the predicted cycle time value in the event of sudden equipment failure or production plan changes. The state transition equation describes the relationship between the state variables from time t to time t+1 and includes system process noise. The observation equation describes the relationship between the observed real-time production cycle time and the actual state variables and includes measurement noise.
[0045] The spatiotemporal topology compression algorithm for material flow diagrams identifies high-frequency flow patterns and extracts them as reusable subgraph templates, avoiding the repeated storage of similar flow path structures and significantly reducing storage space usage. Spatial locality hashing and run-length encoding further compress static and repetitive state information, enabling the system to manage material flow history over longer time spans with limited storage resources. It supports rapid pattern matching queries, providing a data foundation for abnormal flow detection and process optimization. The adaptive Kalman filter prediction algorithm for production takt time accurately captures the trend changes and periodic fluctuations of real-time production takt time through dynamic system modeling and noise estimation. The adaptive mechanism adjusts the adaptive Kalman filter parameters online based on the residual between the predicted takt time value and the actual real-time production takt time, enhancing the algorithm's responsiveness to changes in the production environment. Multi-source data fusion comprehensively utilizes information from different sources to reduce measurement errors from a single data source, improving the stability and reliability of the predicted takt time value. This provides an accurate time reference for material distribution plan adjustment suggestions, reducing problems of untimely or excessive material supply caused by real-time production takt time estimation deviations, and improving overall production and operation efficiency.
[0046] The core fixed attributes are basic attribute fields in product codes, process routes, and material attributes that do not change with product type. Dynamically extended attributes are attribute fields that are flexibly added according to different product types. The inverted index is an index structure in the document database that quickly locates the set of product codes containing the extended attribute based on the extended attribute name or value. The Bloom filter is a space-efficient probabilistic data structure used to determine whether an element is in a set, allowing for a certain false positive rate but preventing false negatives. Lua is a lightweight scripting language that ensures the atomicity of multiple commands when executed in the Redis distributed cache database. The Apache Flink streaming computing framework is a distributed stream processing engine that supports stateful computation on unbounded and bounded data streams. The feature embedding layer is a layer in a neural network that converts discrete product type codes or process route identifiers into continuous vector representations. The gating mechanism is a mechanism in a neural network that adaptively controls the flow of information through learnable gating parameters. The VF2 algorithm is an efficient algorithm for subgraph isomorphism judgment, reducing the search space through depth-first search and pruning strategies. The Geohash encoding algorithm is a spatial indexing algorithm that encodes two-dimensional or three-dimensional geographic coordinates into short strings, with similar coordinates having similar encoding prefixes. The H∞ filter is a robust filter that maintains a lower bound on its filtering performance even when model uncertainties and external disturbances exist.
[0047] The specific implementation methods of the above steps are described in detail below.
[0048] The specific implementation of step S01 involves first deploying a relational database management system on the server side, creating a product basic information table and setting the product code field as the primary key, creating a process route table and setting the process route identifier field as the primary key, and creating a material master data table and setting the material code field as the primary key. The core fixed attributes are stored in the corresponding fields of the three tables. Simultaneously, a document database management system is deployed on the server side, creating a document object for each product code. The document object uses a nested key-value pair structure to store a dynamically extended attribute set. An inverted index is built for the extended attribute names and values in the dynamically extended attribute set. Document objects are allocated to different database sharding nodes according to the number of product types, and a caching service is deployed. The system stores a set of dynamically extended attributes corresponding to product codes accessed more than 100 times per hour. A unified data access interface module is developed to receive query requests containing product codes and a list of query fields. Based on the list of query fields, it determines whether to retrieve core fixed attributes from a relational database or dynamically extended attributes from a document database. Query commands are sent to both databases in parallel. After collecting the query results, the data is merged according to the product code and returned to the caller. The purpose of these steps is to solve the technical problem that a single database cannot simultaneously support fixed attributes and frequently changing extended attributes through a hybrid storage architecture. Inverted index technology ensures fast retrieval performance for extended attributes, while sharding strategies and caching mechanisms further improve query response speed.
[0049] The specific implementation of step S02 involves deploying a graph database management system on the server side. When a material flow event occurs, the system receives flow records containing the unique identifier of the upstream material batch, the unique identifier of the downstream material batch, the process number, the flow timestamp, the operator's identifier, and the equipment number. Corresponding graph nodes are created or searched using the unique identifiers of the upstream and downstream material batches. Directed edges are created between the two graph nodes, and the process number, flow timestamp, operator's identifier, and equipment number are stored as edge attributes. A Bloom filter is initialized, and the bit array length is set to 1,000,000 and the number of hash functions is set to 5. When performing a batch traceability query, the system starts from the node corresponding to the unique identifier of the target material batch. Simultaneously, a breadth-first search is performed upstream and downstream, maintaining two search queues to store the sets of nodes to be visited. Each time a node is taken from a queue, a Bloom filter is used to determine whether it has been visited. If it has not been visited, its adjacent nodes are added to the queue. When the search queues in the two directions intersect, a complete traceability path is determined. For traceability paths with a query frequency exceeding 50 times per day, intermediate results are stored in a pre-computation cache. The purpose of these steps is to build complex relationships between material batches through a graph database to support efficient batch traceability. The bidirectional breadth-first search algorithm reduces the search depth by half compared to unidirectional search, and the Bloom filter quickly excludes visited nodes to avoid repeated traversal by using a space-for-time strategy.
[0050] The specific implementation of step S03 involves deploying a Redis distributed cache database on the server side. A corresponding distributed lock key value is generated for each inventory record identifier. A hash table object containing the current inventory quantity and version number fields is maintained for each inventory record. When a material requisition request is received, the Redis SETNX command is first called to attempt to acquire the distributed lock corresponding to the inventory record identifier and set the expiration time to 5 seconds. After successful acquisition, the current inventory quantity and version number fields in the hash table object are read. It is then determined whether the current inventory quantity is greater than or equal to the requisition quantity. If the condition is met, a pre-written Lua script is executed to atomically perform the calculation of subtracting the requisition quantity from the current inventory quantity, write the calculation result back to the hash table, and increment the version number field by 1. After execution, the DEL command is called to release the distributed lock. The inventory quantity deduction result message, containing the unique identifier of the material batch, the quantity issued, and the updated version number, is sent to the message queue. If the current inventory quantity is less than the quantity issued or the version number field is modified by other operations during execution, the process is rolled back and a failure response is returned. The message queue consumption process is deployed to asynchronously process the deduction result message and update the material flow record table and the line-side inventory table. The purpose of these steps is to solve the inventory deduction consistency problem in high-concurrency scenarios through distributed locks and version number mechanisms. The Lua script is executed on the Redis server to ensure the atomicity of the check and deduction operations and avoid over-issuance. The asynchronous processing of the message queue reduces the synchronization waiting time and improves the system throughput.
[0051] The specific implementation of step S04 involves deploying the Apache Flink streaming computing framework on the server and configuring the task manager and job manager. A data source connector is created to collect real-time data streams from the production equipment sensors, including equipment number, timestamp, running status identifier, and processing parameter values. The data streams are grouped by the equipment number field to obtain sub-data streams corresponding to each equipment number. A sliding window operator is applied to each sub-data stream, with a window length of 300 seconds and a sliding step size of 60 seconds. When the window is triggered, the total time period during which the running status identifier is "on" is counted as the equipment on-time. The number of changes in processing parameter values is counted as the number of processed pieces. The equipment on-time is divided by the number of processed pieces to obtain the processing time per piece, which is the real-time production cycle time. The real-time production cycle time values generated by 10 consecutive sliding windows are combined into a time series. The state variables of the initial adaptive Kalman filter include the cycle time mean, cycle time change rate, and periodicity. The system calculates the state transition noise covariance matrix and observation noise covariance matrix using historical real-time production cycle data, and performs prediction and update steps of the Kalman filter for each newly arrived real-time production cycle to obtain the current state estimate. Based on the cycle mean and cycle change rate in the state estimate, the predicted cycle values for the next 5 sliding windows are extrapolated. The reciprocal of the predicted cycle value is calculated and multiplied by the single-unit material consumption rate to obtain the material consumption rate. The safety level of the line-side inventory is calculated and divided by the material consumption rate to obtain the material delivery lead time. The purpose of these steps is to avoid the delay accumulation problem of traditional batch processing by processing massive amounts of equipment data in real time through streaming computing. The sliding window mechanism smooths short-term fluctuations while ensuring real-time performance. The adaptive Kalman filter describes the dynamic evolution law of production cycle through a state-space model to provide accurate future trend predictions.
[0052] The specific implementation of step S05 involves obtaining the product type code and process route identifier from step S01, and obtaining the material flow record from step S02. The material batch unique identifier sequence, process number sequence, and flow time interval sequence are extracted and sorted by timestamp to form the material flow time sequence feature. The product type code, process route identifier, and material flow time sequence feature are then input into the trained production data fusion model. The input layer of the production data fusion model receives the three types of features and passes them to the feature embedding layer. The feature embedding layer maps the product type code and process route identifier into a 512-dimensional dense vector through a lookup table operation. The number of attention heads in the multi-head self-attention module is determined based on the number of product types in step S01, the process route complexity coefficient in step S01, and the average material flow depth in step S02. Each attention head independently calculates the attention weights between the input vectors and performs a weighted sum to obtain the output feature vector. The feature fusion layer receives the output feature vectors of all attention heads and calculates the fusion weights through a gating unit. The fused feature vector is obtained by multiplying the fusion weights and the output feature vector element by element and summing the results. The decoding layer contains two independent fully connected neural network branches that process the fused feature vectors respectively. The first branch outputs a data model configuration scheme consisting of extended attribute index field selection, sharding key setting, and caching strategy parameters. The second branch outputs material delivery plan adjustment suggestions consisting of the upper limit value of line-side inventory, the lower limit value of line-side inventory, delivery batch size, and delivery trigger threshold. Based on the data model configuration scheme, the unified data access interface in step S01 is called to modify the index configuration and caching strategy of the document database. Based on the material delivery plan adjustment suggestions, the upper limit of the line-side inventory safety level in step S04 is modified to the upper limit value of the line-side inventory and the lower limit value of the line-side inventory. The purpose of these steps is to automatically optimize the data model configuration and material delivery strategy through a deep learning model. The multi-head self-attention mechanism captures the correlation patterns between different product types and process routes. Feature decorrelation constraints enable different attention heads to learn complementary features to improve the model's generalization ability.
[0053] The specific implementation of step S06 involves deploying a monitoring process to periodically collect the response time of the extended attribute query of the unified data access interface in step S01 every 10 seconds. When the response time of three consecutive collections exceeds 500 milliseconds, a cache preheating process is triggered to traverse the top 1000 product codes with the highest access frequency and load the corresponding dynamic extended attribute set into the cache server. At the same time, the index reconstruction command of the document database is called to defragment and optimize the inverted index. The monitoring process periodically calculates the ratio of the number of distributed lock acquisition failures to the total number of requests in step S03 every 30 seconds as the inventory concurrency conflict rate. When the inventory concurrency conflict rate exceeds 5%, the granularity of the distributed lock is refined from the inventory record identifier level to the unique identifier of the material batch. To reduce lock contention, the monitoring process periodically calculates the square root of the mean of the squared differences between the predicted cycle time value in step S04 and the actual real-time production cycle time every 60 seconds as the prediction error. When the prediction error for five consecutive calculation cycles exceeds 15% of the historical prediction error mean, the current adaptive Kalman filter is deemed to have failed, and the system automatically switches to the H∞ filter and reinitializes the filter parameters to enhance robustness to abnormal disturbances. The purpose of these steps is to ensure the stable operation of the system under various abnormal conditions through real-time monitoring and adaptive adjustment mechanisms, prevent the continuous deterioration of query performance through cache preheating and index reconstruction, balance concurrency performance and consistency assurance through dynamic lock granularity adjustment, and address the prediction inaccuracy problem caused by sudden changes in the production environment through filter switching strategies.
[0054] It should be noted that one of the key technical ideas of this invention is a hybrid storage architecture combined with dynamic index optimization technology. By separating and storing stable core fixed attributes and frequently changing dynamic extended attributes in relational databases and document databases, it breaks through the performance bottleneck of traditional single databases when processing heterogeneous data. The inverted index and sharding strategy ensure that the response time for extended attribute queries does not increase linearly with the increase of product types. The introduction of a caching layer further reduces the access latency of hot data. Compared with the traditional solution that requires frequent modification of the database table structure, the hybrid storage architecture supports the rapid expansion of product types without downtime maintenance, providing flexible and efficient data management capabilities for production scenarios in the equipment manufacturing industry where multiple product forms coexist.
[0055] The second key technological approach is a material traceability technology that combines graph databases with bidirectional search and spatiotemporal compression. It leverages the inherent expressive power of graph structures to address the network-like relationships between material batches. A bidirectional breadth-first search algorithm simultaneously expands from both the starting and ending points of the traceability process, halving the search depth. A Bloom filter quickly eliminates irrelevant paths through probabilistic judgment, significantly reducing memory consumption. A spatiotemporal topology compression algorithm identifies repetitive flow patterns and extracts them as reusable templates. Combined with spatial locality hashing and run-length encoding, storage space is compressed to 15% to 20% of the original. Compared to the performance crashes that occur with traditional recursive queries when the traceability depth exceeds ten levels, this technological combination controls complex traceability query time to within seconds, providing reliable support for rapid location of quality issues and accountability.
[0056] The third key technological approach is a real-time production monitoring technology that integrates streaming computing with adaptive filtering. Based on the Apache Flink streaming computing framework, it processes tens of thousands of data points from equipment sensors per second. The sliding window mechanism achieves real-time aggregation and statistics while ensuring low latency. The adaptive Kalman filter models the production cycle as a dynamic system and accurately predicts future trends through state estimation. The adaptive mechanism adjusts filter parameters online based on prediction errors and switches to a robust filter when abnormal fluctuations are detected. Multi-source data fusion integrates equipment status, material consumption, and personnel operation information to improve prediction reliability. Compared with the minute-level latency and the inability of static prediction models to cope with changes in the production environment in traditional batch processing modes, this technology achieves millisecond-level anomaly detection and second-level cycle prediction, providing an accurate time reference for material distribution planning and reducing supply misalignment problems.
[0057] The synergistic effect of the three key technological approaches mentioned above lies in building a complete technology chain from data storage and correlation analysis to real-time prediction. The hybrid storage architecture provides a flexible data management foundation, graph database traceability technology mines deep correlations in material flow, and streaming computing prediction technology enables real-time perception of production status. The three work together to solve the core pain points in production management in the equipment manufacturing industry, such as the difficulty in managing heterogeneous data, the lack of transparency in material flow, and the uncontrollability of the production process. The production data fusion model is based on the joint modeling of multi-source data generated by the three subsystems. It learns complementary feature representations through feature decorrelation mechanisms and automatically optimizes data model configuration and material distribution strategies to form a closed-loop feedback. Compared with the state of independent operation of each subsystem and lack of coordination in the existing technology, the above technology system realizes the deep integration of data flow, logistics, and information flow, significantly improving production operation efficiency and material kitting management level.
[0058] It should be noted that this invention also solves the following technical problems: low efficiency in material batch traceability path query and excessive storage space for historical flow data in complex material flow scenarios. This invention constructs a material genealogy database using a directed graph structure to record material flow relationships. It utilizes a bidirectional breadth-first search algorithm to simultaneously expand the search range from the start and end points until the search frontiers in both directions meet, significantly reducing the number of search nodes and improving traceability query speed. A Bloom filter is used to quickly determine whether a material batch's unique identifier is in the traceability path, avoiding duplicate access. A spatiotemporal topology compression algorithm identifies high-frequency flow patterns and extracts them as reusable subgraph templates, recording only the differences between the actual flow path and the subgraph template. A spatial locality hash function is used to map the three-dimensional coordinates of the material storage location to hash values, and run-length encoding is used to compress continuous dwell states within the same spatial area, significantly reducing the storage space occupied by historical flow data while supporting fast decoding and restoration of the complete flow path.
[0059] Furthermore, this invention also solves the technical problem of insufficient accuracy in production cycle prediction leading to a mismatch between material delivery plans and actual production needs. This invention establishes a streaming data processing platform to collect sensor data from production equipment and uses a sliding window mechanism to calculate real-time production cycle time. The real-time production cycle time sequence from multiple consecutive sliding windows is input into an adaptive Kalman filter for state estimation. The adaptive Kalman filter models the real-time production cycle time as a state variable including the cycle time mean, cycle time change rate, and periodic fluctuation components. Historical real-time production cycle time data is used to estimate the state transition noise covariance matrix and the observation noise covariance matrix. The filter parameters are automatically adjusted based on the residual between the predicted cycle time value and the actual real-time production cycle time. When the standard deviation of the residuals from multiple consecutive sliding windows exceeds the threshold of the historical residual standard deviation, the filter switches to an H∞ filter to enhance the suppression of abnormal disturbances. Multi-source data, including equipment status sensor data, material consumption records, and personnel operation logs, are integrated for joint state estimation, improving the accuracy of predicted cycle time values in the event of sudden equipment failures or changes in production plans. Based on accurate predicted cycle time values, the material consumption rate and material delivery lead time are calculated, ensuring that the material delivery plan remains synchronized with actual production needs.
[0060] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the aforementioned production basic data management method based on a scalable data model.
[0061] A third aspect of the present invention provides a production basic data management system based on a scalable data model, comprising the aforementioned computer-readable storage medium, wherein the system is any one of a computer, a server, or a microcontroller, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.
[0062] Specifically, the principle of this invention is as follows: The invention solves the aforementioned technical problems through a hybrid storage architecture that classifies and stores data according to attribute characteristics in different types of databases, fully leveraging their respective technical advantages to achieve a balance between performance and flexibility. The relational database uses row-oriented storage and a B+ tree index structure, providing high-efficiency query performance and strict ACID protection when handling transactional operations with structured fixed attributes, ensuring the consistency of core data such as product codes and process routes. The document database uses a JSON document storage format and an inverted index mechanism, allowing for flexible addition of new fields without predefined schemas when handling dynamically extended attributes. The inverted index supports fast full-text retrieval by attribute name and value. The nested document mode organizes multiple extended attributes of the same product into a single document, reducing cross-document association overhead. A unified data access interface, acting as an intermediate layer, shields the differences between the underlying databases. It identifies the required fixed and extended attributes through query request parsing, initiates parallel query requests to both the relational and document databases, and merges the returned results according to product codes before returning them uniformly. This avoids the application layer directly handling the complex logic of cross-database queries. The caching layer uses a least recently used algorithm to cache frequently accessed extended attribute data, further reducing query latency.
[0063] The following provides a specific embodiment 1 of the present invention. The specific implementation methods of S01-S03 in this embodiment 1 are the same as those described above, and will not be repeated in detail here. The specific implementation methods of the remaining steps are described in detail below.
[0064] The specific implementation of step S04 involves establishing a streaming data processing platform based on the Apache Flink streaming computing framework. The sensor data from the production equipment includes the equipment number, timestamp, operating status identifier, and processing parameter values. After entering the streaming data processing platform, the sensor data is grouped by equipment number. A sliding window mechanism is used, with a window length of 300 seconds and a sliding step of 60 seconds. Within each sliding window, the equipment uptime and number of processed parts are recorded, and the processing time per part is calculated as the real-time production cycle time. The formula for calculating the real-time production cycle time is as follows:
[0065] ;
[0066] In the formula, For real-time production cycle time, the unit is per second per piece. The baseline beat is 60 seconds per piece, by default. The device's power-on time, in seconds. For reference duration, the default is 300 seconds. This refers to the number of parts processed, in units of pieces. This is a reference number, defaulting to 1 piece. The formula for calculating the material consumption rate is as follows:
[0067] ;
[0068] In the formula, This refers to the material consumption rate, measured in units per second. The baseline consumption rate is 1 item per second by default. This refers to the consumption of materials per unit, expressed in units of one piece. This is the standard single-piece material consumption, with a default value of 1 piece. For real-time production cycle time, the unit is per second per piece. The standard delivery time is 60 seconds per item by default. The formula for calculating the material delivery lead time is as follows:
[0069] ;
[0070] In the formula, This refers to the lead time for material delivery, measured in seconds. The baseline lead time is 3600 seconds by default. This represents the safety level for inventory at the production line, in units of pieces. The standard safety water level is 100 pieces by default. This refers to the material consumption rate, measured in units per second. This is the standard material consumption rate, which defaults to 1 unit per second.
[0071] The specific implementation of step S05 involves inputting product attributes, process parameters, and material flow records into a production data fusion model. The production data fusion model's structure includes an input layer that receives product type codes, process route identifiers, and material flow time sequence features. A feature embedding layer converts the product type codes and process route identifiers into dense vectors. A multi-head self-attention module within a feature-decorrelation-based representation learning enhancement framework captures the association patterns between different product type codes. A feature-decorrelation regularization term constrains the correlation between attention heads, prompting different attention heads to learn complementary feature representations. The feature fusion layer adaptively fuses the output feature vectors of multiple attention heads through a gating mechanism. The decoding layer outputs a data model configuration scheme and material distribution plan adjustment suggestions. The data model configuration scheme includes extended attribute index field selection, sharding key settings, and caching strategy parameters. The material distribution plan adjustment suggestions include upper and lower limits for line-side inventory, delivery batch size, and delivery trigger threshold. The extended attribute index strategy is adjusted according to the data model configuration scheme, and the line-side inventory level threshold is adjusted according to the material distribution plan adjustment suggestions. The calculation formula for the feature-decorrelation regularization term is as follows:
[0072] ;
[0073] In the formula, For feature decorrelation regularization term, To focus on the number of heads, For the first The first attention head and the first Pearson correlation coefficient between the feature vectors output by the attention heads For absolute value operations, For attention head index, This serves as the attention head index. The formula for calculating the Pearson correlation coefficient is as follows:
[0074] ;
[0075] In the formula, For the first The output feature vector of each attention head For the first The output feature vector of each attention head for and The covariance function is used to calculate the covariance of two vectors. for The variance function is used to calculate the variance of a vector. for variance function, This is the covariance normalization coefficient, which defaults to 1. This is the variance normalization coefficient, which defaults to 1. The number of attention heads in the multi-head self-attention module is determined based on the number of product types currently being managed, the process route complexity coefficient, and the average material flow depth. The formula for calculating the process route complexity coefficient is as follows:
[0076] ;
[0077] In the formula, This represents the complexity coefficient of the process route. This represents the average number of processes, expressed in units of [number]. This is the standard number of processes, which is 10 by default.
[0078] The specific implementation of step S06 involves establishing an anomaly detection and adaptive adjustment mechanism. When the extended attribute query response time exceeds 500 milliseconds, cache preheating and index rebuilding are triggered. When the inventory concurrency conflict rate exceeds 5%, the lock granularity is dynamically increased. When the tick prediction error exceeds 15%, a robust filter is switched to. The formula for calculating the tick prediction error is as follows:
[0079] ;
[0080] In the formula, Let $\frac{ ... To predict the beat value, the unit is seconds. This represents the actual real-time production cycle time, in seconds. For absolute value operations, The standard tempo is 60 seconds by default. The standard deviation of historical residuals, in seconds. The standard residual is 5 seconds by default.
[0081] The specific implementation of the spatiotemporal topology compression algorithm is to group material movement events according to a 300-second time window, identify flow patterns that occur more than 10 times within each time window and extract them as subgraph templates. The subgraph templates include unique material batch identifiers for source nodes and target nodes, as well as edge attribute features. A graph isomorphism detection algorithm is used to compare the structural similarity between the flow rotor graphs of different time windows and the existing subgraph templates. When the isomorphism similarity exceeds 0.85, the flow rotor graph is marked as a template instance, and only the difference attributes with the subgraph template are recorded. A spatial locality hash function is introduced to map the three-dimensional coordinates of the material storage location into hash values. Nodes with the same hash value are clustered into the same spatial region. For the continuous dwell state of materials in the same spatial region, run-length encoding is used to record the state type and duration. The compressed topology structure supports the rapid reconstruction of the complete flow path through subgraph template indexing and difference attribute decoding. The graph isomorphism detection algorithm uses the VF2 algorithm to determine whether two graph structures are isomorphic, and the spatial locality hash function uses the Geohash encoding algorithm to encode the three-dimensional coordinates into hash values in string form.
[0082] The specific implementation of the adaptive Kalman filter prediction algorithm for production beat rate is as follows: Real-time production beat rate is modeled as a state variable, which includes the beat rate mean, beat rate of change, and periodic fluctuation components. A state transition equation is established to describe the evolution of the real-time production beat rate within consecutive sliding windows. An observation equation is established to correlate the actual measured real-time production beat rate with the state variable. The state transition noise covariance matrix and the observation noise covariance matrix are estimated using historical real-time production beat rate data. The adaptive Kalman filter updates the state based on the current state estimate and the new observed real-time production beat rate. The residual between the predicted beat rate value and the actual real-time production beat rate is calculated. When the standard deviation of the residuals for five consecutive sliding windows exceeds twice the standard deviation of the historical residuals, it is judged as an abnormal fluctuation, and the filter automatically switches to the H∞ filter to enhance the suppression of abnormal disturbances. The state transition equation is expressed as follows:
[0083] ;
[0084] In the formula, For a moment The state variable vector, Here is the state transition matrix. For a moment The state variable vector, This is the system process noise vector, with the same units as the state variable vector. This serves as the index for the sliding window time. The observation equation is expressed as follows:
[0085] ;
[0086] In the formula, For a moment Observed real-time production cycle time, in seconds. For the observation matrix, For noise measurement, the unit is seconds. For a moment The state variable vector. Represented as:
[0087] ;
[0088] In the formula, For a moment The average beat value, in seconds. The rate of change of beat, in seconds. This represents the periodic fluctuation component, measured in seconds. State transition matrix. Represented as:
[0089] ;
[0090] In the formula, This is the influence coefficient of the rate of change of beat rate, with a default value of 0.2. This is the periodic decay coefficient, with an empirical value of 0.95. Observation matrix. Represented as:
[0091] .
[0092] It should be noted that the variables involved in this embodiment are explained in detail in Table 1.
[0093] Table 1. Variable Explanation Table
[0094]
[0095] To better understand and implement this invention, a specific application scenario of the invention is provided below as Example 2: To verify the effectiveness of the invention, technicians built a test environment and applied it to the material management problem of an assembly line. This production line mainly produces three types of products: Type A controllers, Type B sensors, and Type C actuators, involving 15 processes, managing 230 types of materials, with an average of 120 production orders per day and more than 500 material flow batches. Traditional material management methods use a single relational database to store all data, which faces problems such as slow extended attribute queries, long batch traceability times, frequent inventory concurrency conflicts, and untimely material delivery, seriously affecting production efficiency.
[0096] Technicians established a hybrid storage architecture according to the method of this invention. Core fixed attributes such as product codes, process route identifiers, and material codes are stored in a MySQL relational database, while dynamic extended attributes such as special process parameters and quality inspection standards for different product types are stored in a MongoDB document database. The product basic information table contains 198 product records, the process route table records 45 different process routes, and the material master data table contains information on 230 types of materials. The document database adopts a nested document schema, configuring 12 extended attributes for type A controllers, 8 extended attributes for type B sensors, and 15 extended attributes for type C actuators. An inverted index supports fast retrieval by extended attribute name, and the cache layer caches the dynamic extended attribute set of the top 50 most accessed product codes.
[0097] Technicians constructed a material genealogy database, using the Neo4j graph database as the basic platform, and established a unique identifier node for each material batch. For example... Figure 2 As shown, node attributes include a unique material batch identifier, material code, and batch generation time; edge attributes include process number, flow timestamp, operator identifier, and equipment number. During the test, a total of 15,600 material batch nodes were generated, recording 38,400 flow edge relationships. Technicians used a bidirectional breadth-first search algorithm for batch traceability queries, tracing back from a finished product batch to the raw material batch, involving 8 levels of material flow. Traditional unidirectional search requires traversing 1,200 nodes, while bidirectional search only traverses 340 nodes. A Bloom filter uses three hash functions to map the unique material batch identifier to a 65,536-bit bit array, quickly determining whether a batch is in the traceability path, with a false positive rate controlled below 0.01.
[0098] The technical staff deployed a distributed inventory management system, using a Redis distributed cache database to implement a distributed lock mechanism. The inventory record table maintains inventory quantity and version number fields for 230 types of materials, with the initial version number set to 1 for all. In a production order requiring 50 units of material M001, the system locks inventory record M001 using a distributed lock, reads the current inventory quantity (320 units) and version number (47), checks if the requirement is met, deducts the inventory quantity to 270 units, increments the version number to 48, releases the distributed lock, and sends the deduction result (containing the material batch unique identifier, the quantity of 50, and the version number 48) to a Kafka message queue. The consumer asynchronously updates the material flow record table and the line-side inventory table; the entire operation takes 12 milliseconds. Lua scripts atomically execute the entire process of inventory quantity checking, deduction, and version number updating in Redis, avoiding concurrent conflicts.
[0099] Technical personnel established a streaming data processing platform and built a real-time data processing pipeline based on the Apache Flink streaming computing framework. For example... Figure 3 As shown, the sensor data from the production equipment includes equipment number, timestamp, operating status identifier, and processing parameter values, with a data acquisition frequency of once per second. After entering the platform, the data is grouped by equipment number, with a sliding window length of 300 seconds and a sliding step size of 60 seconds. For equipment D005, the recorded operating time within a certain sliding window is 285 seconds, and the number of processed pieces is 19. The calculated processing time per piece is 15 seconds, which is taken as the real-time production cycle time. The real-time production cycle time sequence of 12 consecutive sliding windows is input into an adaptive Kalman filter. The state variables include a mean cycle time of 15.2 seconds, a cycle time change rate of 0.03 seconds per window, and a periodic fluctuation component of 0.8 seconds. The adaptive Kalman filter outputs a predicted cycle time value of 15.5 seconds, calculates a material consumption rate of 232 pieces per hour, sets the line-side inventory safety level to 120 pieces, and calculates the material delivery lead time to 31 minutes.
[0100] Technicians input product type codes, process route identifiers, and material flow sequence characteristics into the production data fusion model. The training dataset collected 14,500 historical production work orders over six months, along with 87,000 material in / out records and 320,000 production line operation logs. For each historical production work order, product type codes, process route identifiers, and bills of materials were extracted. The frequency of extended attribute queries, query response times, material delivery frequency, and delivery delay times were statistically analyzed. Performance indicators of the data model configuration scheme and the matching rate of material delivery plan adjustment suggestions were also labeled. Material flow sequence characteristics were derived by sorting material flow records by timestamp and extracting a unique batch identifier sequence, a process number sequence, and a flow time interval sequence. The training set consisted of 11,600 work orders, and the validation set consisted of 2,900 work orders, divided at an 8:2 ratio.
[0101] The input layer of the production data fusion model receives product type codes, process route identifiers, and material flow time sequence features. The feature embedding layer converts the product type codes into 128-dimensional dense vectors and the process route identifiers into 64-dimensional dense vectors. The multi-head self-attention module sets the number of attention heads to 8 to capture the correlation patterns between different product type codes. The feature decorrelation regularization term calculates the Pearson correlation coefficient matrix between the column vectors of the output feature vector matrix of each attention head, and adds a penalty term of 0.32 (the sum of the absolute values of the off-diagonal elements) to the total loss function. The feature fusion layer adaptively fuses the output feature vectors of the 8 attention heads through a gating mechanism; the gating parameters are dynamically adjusted during training. For the decoding layer's output data model configuration, it is recommended to select the process parameters temperature, pressure, and speed as the extended attribute index fields, set the sharding key to the product type code, and set the cache strategy parameters to a cache capacity of 5000 records and a cache expiration time of 600 seconds. The suggested adjustments to the material distribution plan are as follows: the upper limit of line-side inventory is 150 units, the lower limit of line-side inventory is 80 units, the batch size for distribution is 40 units, and the distribution trigger threshold is 90 units.
[0102] Technicians applied a spatiotemporal topology compression algorithm to compress and store the material flow diagram. Material movement events were grouped according to 300-second time windows. Flow patterns occurring more than 10 times within a certain time window were identified as direct flows from process W02 to process W05 and extracted as subgraph template T01. The subgraph template includes the unique batch identifier patterns of the source node and the target node, as well as the edge attribute features of the process number sequence W02 to W05. The VF2 algorithm was used to compare the structural similarity between the flow diagrams from different time windows and the subgraph template T01. When the isomorphic similarity exceeded 0.85, the flow diagram was marked as a template instance, and only the differences from the template were recorded, such as the flow timestamp and the specific value of the operator's identifier. A spatial locality hash function, using the Geohash encoding algorithm, mapped the three-dimensional coordinates of the material storage location to hash values. The coordinate range of a certain storage area was within the range of 0 to 10 meters on the X-axis, 0 to 8 meters on the Y-axis, and 0 to 3 meters on the Z-axis, encoded as a string of length 6. Location nodes with the same encoding prefix were clustered into the same spatial region. Run-length encoding is used to record the continuous residence state of materials in the same spatial area. The state type is static and the duration is 1800 seconds. The storage space of the compressed topology structure is reduced to 38% of the original data.
[0103] Technical personnel established an anomaly detection and adaptive adjustment mechanism. When the extended attribute query response time reached 620 milliseconds at a certain moment, exceeding the 500 millisecond threshold, the system automatically triggered cache preheating and index rebuilding operations, loading the dynamic extended attribute set of hot product codes into the cache and rebuilding the inverted index, reducing the query response time to 180 milliseconds. When the inventory concurrency conflict rate reached 7%, exceeding the 5% threshold, the system dynamically increased the lock granularity, adjusting the locks from the original material code granularity to the material batch unique identifier granularity, reducing the concurrency conflict rate to 2%. When the standard deviation of the cycle prediction error for five consecutive sliding windows was 2.8 seconds, exceeding twice the historical residual standard deviation of 1.2 seconds, the system determined it to be an abnormal fluctuation and automatically switched to the H∞ filter to enhance the suppression of abnormal disturbances, significantly improving the stability of the predicted cycle value. Some test data are shown in Table 2.
[0104] Table 2 Performance Comparison of Extended Attribute Queries
[0105]
[0106] The advancements of this invention compared to traditional methods lie in the following: The hybrid storage architecture separates core fixed attributes from dynamically extended attributes, avoiding the frequent table structure changes and sparse field storage issues encountered by relational databases when handling heterogeneous attributes across different product types. The nested document schema and inverted index mechanism of the document database enable efficient querying and filtering operations for extended attributes within documents, reducing the overhead of cross-table joins and full table scans. The material genealogy graph database uses a graph structure to naturally represent the network relationships of material flow. The bidirectional breadth-first search algorithm expands the search range simultaneously from the start and end points, reducing the search space and path length compared to unidirectional search. The Bloom filter achieves fast filtering with extremely low space cost during path determination, significantly improving batch traceability efficiency. The distributed lock mechanism, combined with a version number field and atomic operation scripts, ensures the consistency and isolation of inventory quantity deduction operations. The asynchronous confirmation processing of the message queue decouples inventory updates from business processes, avoiding performance bottlenecks caused by long lock wait times. The streaming data processing platform calculates production cycle time in real time using a sliding window mechanism. An adaptive Kalman filter fuses historical trends and current observations to dynamically estimate future cycle time. Multi-source data fusion integrates equipment status, material consumption, and personnel operation information to improve prediction accuracy, providing a reliable time benchmark for calculating material delivery lead times. In the production data fusion model, feature decorrelation regularization terms constrain different attention heads to learn complementary feature representations, avoiding information redundancy and enhancing the model's generalization ability to new product types and process changes. A gating mechanism adaptively fuses multi-head feature outputs, making data model configuration schemes and material delivery plan adjustment suggestions more accurate. The spatiotemporal topology compression algorithm reduces storage overhead for repetitive flow paths through subgraph template extraction and differential attribute recording. Spatial locality hashing and run-length encoding further compress static information, supporting longer-term historical data management with limited storage resources, providing a sufficient data foundation for process optimization and anomaly detection.
[0107] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for managing production foundation data based on a scalable data model, characterized in that, This includes establishing a production data management system with a hybrid storage architecture. Core fixed attributes such as product codes, process routes, and material properties are stored in a relational database, while dynamic extended attributes such as product types, process parameters, and quality inspection standards are stored in a document database. A unified data access interface enables cross-database joint queries. A material genealogy database is constructed, using unique batch identifiers as nodes to create a directed graph structure that records material flow relationships. A bidirectional breadth-first search algorithm combined with a spatiotemporal topology compression algorithm is used for batch traceability queries. A distributed inventory management system is deployed, employing a distributed locking mechanism to lock inventory records for material requisition operations and using atomic operation scripts to check and deduct inventory quantities. A streaming data processing platform is established to collect sensor data from production equipment, perform micro-batch aggregation processing, calculate real-time production takt time using a sliding window mechanism, predict future takt time trends using an adaptive Kalman filter prediction algorithm, and generate material delivery lead times. Product attributes, process parameters, and material flow records are input into a production data fusion model, which outputs a data model configuration scheme and material delivery plan adjustment suggestions. An anomaly detection and adaptive adjustment mechanism is established, triggering corresponding optimization strategies based on extended attribute query response time, inventory concurrency conflict rate, and takt time prediction error.
2. The production basic data management method based on a scalable data model according to claim 1, characterized in that, In the hybrid storage architecture, the relational database stores the product basic information table, the process route table, and the material master data table, while the document database uses a nested document schema to store the dynamically extended attribute set corresponding to each product code and organizes it in key-value pairs.
3. The production basic data management method based on a scalable data model according to claim 2, characterized in that, The document database supports fast retrieval by extended attribute name and extended attribute value through inverted index, and uses a sharding strategy to distribute the dynamic extended attribute sets of different product types to different storage nodes.
4. The production basic data management method based on a scalable data model according to claim 3, characterized in that, After receiving a query request, the unified data access interface parses the required core fixed attributes and dynamically extended attributes, retrieves data from the relational database and document database respectively, and then merges and returns the results.
5. The production basic data management method based on a scalable data model according to claim 4, characterized in that, The node attributes of the directed graph structure in the material genealogy database include the unique identifier of the material batch, the material code, and the batch generation time. The edge attributes include the process number, the transfer timestamp, the operator identifier, and the equipment number.
6. The production basic data management method based on a scalable data model according to claim 5, characterized in that, When performing batch traceability queries, trace upstream along the inbound edge direction or downstream along the outbound edge direction starting from the node corresponding to the unique identifier of the target material batch. Use a Bloom filter to quickly determine whether the unique identifier of a material batch is in the traceability path.
7. The production basic data management method based on a scalable data model according to claim 6, characterized in that, The bidirectional breadth-first search algorithm expands the search range simultaneously from the starting material batch unique identifier and the ending material batch unique identifier until the search frontiers in both directions meet.
8. The production basic data management method based on a scalable data model according to claim 7, characterized in that, The streaming data processing platform is built on the Apache Flink streaming computing framework. After the sensor data from the production equipment enters the streaming data processing platform, it is grouped by equipment number and a sliding window mechanism is used to set the window length to 300 seconds and the sliding step to 60 seconds.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform a production basic data management method based on a scalable data model as described in any one of claims 1-8.
10. A production-based data management system based on a scalable data model, characterized in that, The system comprises the computer-readable storage medium of claim 9, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.