Instant noodle production line abnormality early warning method and system based on timing characteristics
Patent Information
- Application Number
- CN202610863484.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-09-11
AI Technical Summary
[0003]为了解决现有技术中实体状态特征表达不足、固定时间衰减难以适配复杂工况、多路径聚合缺少查询导向以及静态预警阈值易造成漏报、误报的问题,本发明提出一种基于时序特征的方便面产线异常预警方法及系统
[0016] This invention constructs a four-tuple sparse temporal knowledge graph by collecting multi-dimensional data such as equipment status, process parameters, and material information to characterize the operating status and relationships of an instant noodle production line, alleviating the problem of insufficient information representation caused by data sparsity. During multi-hop logical reasoning, state-value-specific projection and nonlinear fusion enhance the expressive power of entity state features and improve the accuracy of entity embedding representation. In the path expansion stage, a time decay mechanism adjusted by path segment confidence is introduced to characterize the impact of time intervals on the reasoning path score, making the reasoning process more consistent with the evolution of the production line status over time. Simultaneously, a target query-oriented attention mechanism is used to weight aggregation units, highlighting path information highly relevant to the current abnormal target. A dynamic early warning threshold calculation mechanism is established based on the total number of feasible reasoning paths and the variance of path scores, allowing the early warning judgment criteria to be adjusted according to the quantity and distribution stability of reasoning paths, thereby improving the accuracy and reliability of anomaly early warnings for the instant noodle production line.
Smart Images

Figure CN122736019A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of early warning, and in particular relates to an early warning method and system for anomalies in instant noodle production lines based on time-series characteristics. Background Technology
[0002] Instant noodle production lines are evolving towards higher speeds and greater integration. During actual production, these lines continuously generate a large amount of heterogeneous data from multiple sources, including equipment operating status, process control parameters, and material flow information. Due to the close interrelationships between production line equipment and the high degree of coupling in the process flow, abnormal changes in local equipment or processes can gradually propagate along these relationships or processes, thus affecting the stable operation of the production line. Traditional anomaly warning methods typically rely on static thresholds from single sensors or use shallow machine learning models to analyze local data, which can easily lead to problems such as delayed warnings, missed warnings, and difficulties in tracing the source of anomalies. Therefore, there is an urgent need for an early warning analysis method that can characterize the correlation and temporal evolution features of multi-source data to improve the accuracy of production line anomaly identification and warning. Summary of the Invention
[0003] To address the problems in existing technologies such as insufficient representation of entity state features, difficulty in adapting fixed-time decay to complex working conditions, lack of query guidance in multi-path aggregation, and the tendency of static warning thresholds to cause missed or false alarms, this invention proposes an anomaly warning method and system for instant noodle production lines based on time-series features.
[0004] In a first aspect, the present invention proposes a method for early warning of anomalies in instant noodle production lines based on time-series characteristics, comprising the following steps: Collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph; Based on the type, state-value specific projection is performed on the entity, and the general embedding and state-value embedding are nonlinearly fused to generate the initial entity embedding; in the path expansion, a time decay function is applied, and the time decay rate is adjusted according to the confidence of the path segment before the current step to calculate the impact of the time interval on the path score; when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism. The confidence level of the target query is calculated using the inference path as the probability of an anomaly. The total number of feasible inference paths and the variance of the score of each path are recorded. The warning threshold is adjusted according to the total number of feasible inference paths and the variance of the score of each path. When the probability of an anomaly exceeds the adjusted warning threshold, a warning message is output to the production line.
[0005] Optionally, the step of performing state-value-specific projection on the entity according to type and nonlinearly fusing the general embedding and the state-value embedding to generate the initial entity embedding includes: Determine the type of the entity's state value; if it is a continuous value, use a multilayer perceptron to map the continuous value into a state value embedding vector; if it is a discrete state, obtain the corresponding state value embedding vector through a preset embedding dictionary. The general embedding vector of the entity is concatenated with the state value embedding vector and input into a fully connected network containing a nonlinear activation function, and the fused initial entity embedding is output.
[0006] Optionally, the step of applying a time decay function in path expansion, adjusting the time decay rate based on the confidence level of the path segments before the current step, and calculating the impact of time intervals on the path score includes: Obtain the confidence level of the path segment before the current inference step, calculate the difference between the path segment confidence level and the preset constant greater than the upper limit of the path segment confidence level, and use the difference as an adjustment coefficient; Calculate the time interval between the timestamp of historical facts and the current inference timestamp; The dimensionless correction exponent is obtained by multiplying the adjustment coefficient, the time interval, and the preset base decay parameter with the reciprocal unit of time. The negative exponent of the correction exponent is calculated with the natural constant e as the base as the time decay coefficient. The coefficient is then multiplied by the original transition probability score corresponding to the selected action in the current inference step to obtain the current jump path score affected by the time interval.
[0007] Optionally, when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism, including: After mapping the endpoint relationship embedding vector and the endpoint entity embedding vector of each reasoning path to a unified dimension, they are added element by element to obtain the corresponding path aggregation unit representation vector. The inner product of the target query vector mapped to the unified dimension and the representation vectors of each path aggregation unit is calculated as the attention score; The attention scores of all paths are normalized using the Softmax function to obtain the attention weights for each path. The aggregation unit representation vectors of each path are multiplied by their corresponding attention weights and summed to obtain a fused feature vector pointing to the same entity.
[0008] Optionally, the variance of the total number of feasible inference paths and the score of each path includes: Inference paths with a score greater than a preset feasibility threshold are identified as feasible inference paths, and the total number of feasible inference paths corresponding to the target query is counted. Obtain the path scores for all feasible inference paths and calculate the average score; Calculate the square of the difference between the score of each feasible reasoning path and the average value, sum all the squares and divide by the total number of feasible reasoning paths to obtain the variance of the score of each path.
[0009] Optionally, adjusting the warning threshold based on the variance of the total number of feasible inference paths and the score of each path includes: Obtain the preset initial warning threshold; The first adjustment term is obtained by multiplying the variance by a preset variance penalty coefficient, and the second adjustment term is obtained by multiplying the path number reward coefficient by the total number of feasible inference paths. The initial warning threshold is added to the first adjustment term and the second adjustment term is subtracted. The calculation result is then restricted to the range of 0 to 1 by a truncation operation or activation function to obtain the adjusted warning threshold.
[0010] On the other hand, the present invention also provides an early warning system for anomalies in an instant noodle production line based on time-series characteristics, comprising the following modules: The execution module is used to collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph. The computation module is used to perform state-value-specific projection on entities according to their type, and nonlinearly fuse general embeddings and state-value embeddings to generate initial entity embeddings; in path expansion, a time decay function is applied to adjust the time decay rate according to the confidence of the path segments before the current step, and to calculate the impact of time intervals on path scores; when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism. The early warning module is used to calculate the confidence level of the target query as the probability of an anomaly by using the inference path, record the total number of feasible inference paths and the variance of the score of each path, adjust the early warning threshold according to the total number of feasible inference paths and the variance of the score of each path, and output early warning information to the production line when the probability of an anomaly exceeds the adjusted early warning threshold.
[0011] Further, the step of performing state-value-specific projection on entities according to type, and nonlinearly fusing the general embedding and state-value embedding to generate the initial entity embedding includes: Determine the type of the entity's state value; if it is a continuous value, use a multilayer perceptron to map the continuous value into a state value embedding vector; if it is a discrete state, obtain the corresponding state value embedding vector through a preset embedding dictionary. The general embedding vector of the entity is concatenated with the state value embedding vector and input into a fully connected network containing a nonlinear activation function, and the fused initial entity embedding is output.
[0012] Furthermore, the application of a time decay function in path expansion, adjusting the time decay rate based on the path segment confidence level before the current step, and calculating the impact of time intervals on path scores, includes: Obtain the confidence level of the path segment before the current inference step, calculate the difference between the path segment confidence level and the preset constant greater than the upper limit of the path segment confidence level, and use the difference as an adjustment coefficient; Calculate the time interval between the timestamp of historical facts and the current inference timestamp; The dimensionless correction exponent is obtained by multiplying the adjustment coefficient, the time interval, and the preset base decay parameter with the reciprocal unit of time. The negative exponent of the correction exponent is calculated with the natural constant e as the base as the time decay coefficient. The coefficient is then multiplied by the original transition probability score corresponding to the selected action in the current inference step to obtain the current jump path score affected by the time interval.
[0013] Furthermore, when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit. This aggregation unit is then weighted using a target query-oriented attention mechanism, including: After mapping the endpoint relationship embedding vector and the endpoint entity embedding vector of each reasoning path to a unified dimension, they are added element by element to obtain the corresponding path aggregation unit representation vector. The inner product of the target query vector mapped to the unified dimension and the representation vectors of each path aggregation unit is calculated as the attention score; The attention scores of all paths are normalized using the Softmax function to obtain the attention weights for each path. The aggregation unit representation vectors of each path are multiplied by their corresponding attention weights and summed to obtain a fused feature vector pointing to the same entity.
[0014] Furthermore, the variance of the total number of feasible reasoning paths and the score of each path includes: Inference paths with a score greater than a preset feasibility threshold are identified as feasible inference paths, and the total number of feasible inference paths corresponding to the target query is counted. Obtain the path scores for all feasible inference paths and calculate the average score; Calculate the square of the difference between the score of each feasible reasoning path and the average value, sum all the squares and divide by the total number of feasible reasoning paths to obtain the variance of the score of each path.
[0015] Furthermore, adjusting the warning threshold based on the variance of the total number of feasible reasoning paths and the score of each path includes: Obtain the preset initial warning threshold; The first adjustment term is obtained by multiplying the variance by a preset variance penalty coefficient, and the second adjustment term is obtained by multiplying the path number reward coefficient by the total number of feasible inference paths. The initial warning threshold is added to the first adjustment term and the second adjustment term is subtracted. The calculation result is then restricted to the range of 0 to 1 by a truncation operation or activation function to obtain the adjusted warning threshold.
[0016] This invention constructs a four-tuple sparse temporal knowledge graph by collecting multi-dimensional data such as equipment status, process parameters, and material information to characterize the operating status and relationships of an instant noodle production line, alleviating the problem of insufficient information representation caused by data sparsity. During multi-hop logical reasoning, state-value-specific projection and nonlinear fusion enhance the expressive power of entity state features and improve the accuracy of entity embedding representation. In the path expansion stage, a time decay mechanism adjusted by path segment confidence is introduced to characterize the impact of time intervals on the reasoning path score, making the reasoning process more consistent with the evolution of the production line status over time. Simultaneously, a target query-oriented attention mechanism is used to weight aggregation units, highlighting path information highly relevant to the current abnormal target. A dynamic early warning threshold calculation mechanism is established based on the total number of feasible reasoning paths and the variance of path scores, allowing the early warning judgment criteria to be adjusted according to the quantity and distribution stability of reasoning paths, thereby improving the accuracy and reliability of anomaly early warnings for the instant noodle production line. Attached Figure Description
[0017] Figure 1 A flowchart of an anomaly early warning method for instant noodle production lines based on time-series characteristics; Figure 2 This is a diagram illustrating attention scores and weights. Figure 3 This is a diagram illustrating the performance comparison of the models. Detailed Implementation
[0018] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0020] In this application, a method for early warning of anomalies in instant noodle production lines based on time-series characteristics is provided, such as... Figure 1 As shown, it includes the following steps: S1. Collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph.
[0021] A data acquisition module combining industrial fieldbus and programmable logic controller (PLC) acquires hardware-level data, periodically reading the dough machine temperature, calender speed, and fryer oil temperature via Modbus TCP protocol as equipment status and process parameters. Camera video streams are decoded and frame-segmented, and the YOLOv8 object detection algorithm is used to identify dough block integrity as material information. Unstructured log text undergoes word segmentation, part-of-speech tagging, and syntactic dependency analysis, and a BiLSTM-CRF sequence labeling model is used to identify subject entities, object entities, and relationships between entities. Combined with the system's current UNIX timestamp, this information is persistently stored as a quadruple of subject entity, relation, object entity, and timestamp format via a pre-defined graph database write interface or graph query statement. Due to the low frequency of production line anomalies and the time intervals in data sampling, a sparse temporal knowledge graph with loose node connections is formed.
[0022] Initialize the multi-hop logical reasoning model, setting the target query format as query entity, prediction relation, unknown target entity, and query time. Set the dough mixer node as the query entity and the occurrence of an anomaly as the prediction relation. Start the REINFORCE policy gradient algorithm in reinforcement learning as the agent, and search for feasible reasoning paths in the knowledge graph network according to the time-incrementing constraint.
[0023] The multi-hop logical reasoning model is a reasoning model based on knowledge graph path search. It is used to select relations and entities hop by hop in the quadruple sparse temporal knowledge graph according to the target query, generate candidate reasoning paths, and calculate the path score corresponding to the candidate reasoning paths.
[0024] S2, perform state-value-specific projection on the entity according to the type, and nonlinearly fuse the general embedding and the state-value embedding to generate the initial entity embedding.
[0025] A tensor of size 128 is initialized as the general embedding for the entity. The data type of the entity being processed is determined. If the entity type is a continuous numerical variable, a multilayer perceptron is constructed to map the normalized floating-point state values to a 128-dimensional continuous state value embedding vector. If the entity type is a discrete categorical variable, a lookup table using a pre-defined embedding dictionary maps the corresponding category index to a 128-dimensional discrete state value embedding vector, thus completing the state-value-specific projection process. The 128-dimensional general embedding vector is concatenated with the corresponding 128-dimensional state value embedding vector along the feature dimension to generate a 256-dimensional combined concatenated vector. This 256-dimensional combined concatenated vector is input into a fully connected network containing a nonlinear activation function. Feature interaction and dimensionality reduction are performed through linear mapping and nonlinear activation, outputting a 128-dimensional vector as the initial entity embedding vector after nonlinear fusion.
[0026] In one implementation, the step of performing state-value-specific projection on the entity according to its type and nonlinearly fusing the general embedding with the state-value embedding to generate an initial entity embedding includes: Determine the type of the entity's state value; if it is a continuous value, use a multilayer perceptron to map the continuous value into a state value embedding vector; if it is a discrete state, obtain the corresponding state value embedding vector through a preset embedding dictionary. The general embedding vector of the entity is concatenated with the state value embedding vector and input into a fully connected network containing a nonlinear activation function, and the fused initial entity embedding is output.
[0027] The system automatically identifies the state data extracted from production line entities. When the entity's state is a continuous value such as dough temperature or roller pressure (e.g., detecting a dough temperature of 25.3℃ in a dough mixer), this one-dimensional real value is input into a multilayer perceptron with preset neuron counts of 1, 64, and 128. The multilayer perceptron's network structure is a fully connected feedforward neural network containing an input layer, hidden layers, and an output layer. The input is a one-dimensional continuous numerical feature, and the output is a 128-dimensional state value embedding vector. The calculation formula after forward propagation mapping is expressed as follows: Where x is a one-dimensional real-valued input, and These are the weight matrices for the hidden layer and the output layer, respectively. and For the corresponding bias term, For activation function, The output is an embedded vector of state values. When the state of an entity is a discrete state such as a device on / off state or a fault code, for example, the state identifier of a conveyor belt valve is closed and the corresponding category index number is 2, then a 128-dimensional discrete state value embedded vector is obtained by calling a pre-trained embedding dictionary with a vocabulary size of 1000 and a dimension of 128.
[0028] Extract the pre-trained attributes and network topology features of the entity to obtain a 128-dimensional universal embedding vector. This vector is then concatenated with the previously generated state value embedding vector along the feature dimension to generate a 256-dimensional combined concatenated vector. This 256-dimensional concatenated vector is input into a fully connected network with 128 hidden neurons. The fully connected network structure is a single-layer fully connected network containing non-linear activation functions. The input is the 256-dimensional combined concatenated vector generated by the concatenation operation, and the output is a unified 128-dimensional fused initial entity embedding. Dimensionality reduction and feature cross-mapping are performed using non-linear activation functions such as linear rectified functions. The computation process of this fully connected network is represented as follows: ,in Given a 256-dimensional combined concatenation vector as input, This is the weight matrix of the fully connected network layer. For bias vectors, It is a non-linear activation function. The initial entity embedding after fusion is used to achieve the fusion and representation of entity features from different data structures in a unified high-dimensional space.
[0029] S3 applies a time decay function in path expansion, adjusts the time decay rate based on the confidence of the path segments before the current step, and calculates the impact of time intervals on path scores.
[0030] In the path expansion phase where the reinforcement learning agent samples actions from the current entity node to the next hop entity node, the timestamps of candidate next-hop quadruples are extracted, and the absolute value of the difference between the timestamps of the candidate next-hop quadruples and the current inference timestamp is calculated as the time interval. An exponential decay model is constructed to obtain the path segment confidence accumulated by the agent before reaching the current node. The path segment confidence is obtained by multiplying the transition probabilities corresponding to each selected hop action from the initial query entity to the current entity node. When the current entity node is the initial query entity, the path segment confidence is initialized to 1. A time decay rate is generated based on the path segment confidence. The time decay rate is determined by the basic decay parameter and the confidence adjustment term; the lower the path segment confidence, the larger the time decay rate, and the higher the path segment confidence, the smaller the time decay rate. The time decay rate is multiplied by the time interval and the negative exponent is taken to calculate a time decay weight between 0 and 1. The time decay weight is multiplied by the original transition probability score corresponding to the action selected by the agent in the current path expansion step to obtain the current hop path score affected by the time interval.
[0031] The calculation process of the original transition probability score is as follows: when the current entity node expands the path, each selectable edge relationship of the current entity node and its pointed next-hop entity constitutes a candidate action; wherein, the current entity embedding and the candidate next-hop entity embedding are obtained by fusing the general embedding and state value embedding in S2, and the candidate relationship embedding is obtained by looking up the table of the preset relationship embedding dictionary according to the candidate outgoing edge relationship identifier; the current entity embedding, the candidate relationship embedding and the candidate next-hop entity embedding are concatenated on the feature dimension and then input into the multilayer perceptron, and the multilayer perceptron outputs the unnormalized action score corresponding to each candidate action; Softmax normalization is performed on all candidate action scores under the same current entity node to obtain the transition probability corresponding to each candidate action, and the transition probability corresponding to the action actually selected by the agent is used as the original transition probability score of that hop.
[0032] The multilayer perceptron is a feedforward neural network comprising an input layer, at least one hidden layer, and an output layer. The input layer receives a candidate action feature vector formed by concatenating the current entity embedding, candidate relation embedding, and candidate next-hop entity embedding. The hidden layer performs interactive mapping on the semantic association features of the candidate actions through fully connected linear transformation and ReLU, LeakyReLU, or Tanh nonlinear activation functions. The output layer is a single-neuron linear layer used to output the unnormalized action score corresponding to the candidate action. During the training phase, the known inference paths or anomaly warning results corresponding to historical production line anomaly samples are used as supervision signals. Combined with the reward value obtained by the reinforcement learning agent after the path search is completed, the backpropagation algorithm is used to calculate the gradient of the network parameters. The Adam optimizer or stochastic gradient descent optimizer is used to update the weights and biases of each layer, so that candidate actions that correctly point to the anomaly propagation link or can improve the accuracy of anomaly warnings can obtain higher action scores.
[0033] In one implementation, the application of a time decay function in path expansion, adjusting the time decay rate based on the path segment confidence level before the current step, and calculating the impact of time intervals on path scores, includes: Obtain the confidence level of the path segment before the current inference step, calculate the difference between the path segment confidence level and the preset constant greater than the upper limit of the path segment confidence level, and use the difference as an adjustment coefficient; Calculate the time interval between the timestamp of historical facts and the current inference timestamp; The dimensionless correction exponent is obtained by multiplying the adjustment coefficient, the time interval, and the preset base decay parameter with the reciprocal unit of time. The negative exponent of the correction exponent is calculated with the natural constant e as the base as the time decay coefficient. The coefficient is then multiplied by the original transition probability score corresponding to the selected action in the current inference step to obtain the current jump path score affected by the time interval.
[0034] During each multi-step inference pathfinding step, the transition probabilities corresponding to each selected hop action before the current entity node are multiplied sequentially to obtain the cumulative path segment confidence before reaching the current event node, with the value limited to the range of 0 to 1. A constant parameter greater than the upper limit of the path segment confidence is preset, preferably set to 1.2. Assuming the currently obtained path segment confidence is 0.8, the calculated adjustment coefficient is 0.4. The Unix timestamp attached to the historical event fact is extracted and subtracted from the timestamp triggered by the current inference to calculate the time interval in hours. For example, the time interval between the obtained historical event fact and the current inference trigger time is 12 hours. A preset base decay parameter with a time reciprocal unit is set to 0.05 per hour. The obtained adjustment coefficient 0.4, the time interval 12, and the base decay parameter 0.05 are multiplied together to obtain a dimensionless correction exponent of 0.24. By calculating the natural constant e to the power of -0.24, a time decay coefficient of approximately 0.7866 is obtained. Assuming the agent's original transition probability score for the actual selected action in the current jump is 0.90, this original transition probability score of 0.90 is multiplied by a time decay coefficient of 0.7866 to obtain a current jump path score of 0.7079 affected by the time interval. This process reduces the influence of anomalous facts that occurred a long time ago and had low confidence in the early stages on the causal chain.
[0035] S4: When multiple paths point to the same entity, the endpoint relationship and the entity are combined into an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism.
[0036] The algorithm iterates through all paths that have completed multi-hop expansion, grouping them by the unique identifier of the destination entity. If the same destination entity corresponds to more than two inference path records, it is determined that multiple paths point to the same entity. For each convergence path, the endpoint relationship embedding vector of the last step of the path is concatenated with the endpoint entity embedding vector, and then fused into a feature tensor as the aggregation unit vector after dimensionality reduction using a linear layer. Utilizing a dot product attention mechanism, the target query vector generated by the query encoding network is used as the query matrix for the attention mechanism. All aggregation unit vectors belonging to the same destination entity are stacked and used as both the key and value matrices for the attention mechanism. The dot product of the query matrix and the transpose of the key matrix is calculated, and the dot product result is normalized using the softmax function to obtain the attention weight scalar for each path. The attention weight scalar is multiplied by the corresponding value matrix and summed to obtain a weighted aggregated representation vector of the destination entity that integrates information from all arrival paths.
[0037] In one implementation, when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit. This aggregation unit is then weighted using a target query-oriented attention mechanism, including: After mapping the endpoint relationship embedding vector and the endpoint entity embedding vector of each reasoning path to a unified dimension, they are added element by element to obtain the corresponding path aggregation unit representation vector. The inner product of the target query vector mapped to the unified dimension and the representation vectors of each path aggregation unit is calculated as the attention score; The attention scores of all paths are normalized using the Softmax function to obtain the attention weights for each path. The aggregation unit representation vectors of each path are multiplied by their corresponding attention weights and summed to obtain a fused feature vector pointing to the same entity.
[0038] For multi-source topologies in a temporal knowledge graph where multiple precursor paths converge to the same tail entity, a parameter-shared linear transformation matrix is used to map the relational feature vectors of each path at the jump step to the attribute feature vectors of the tail entity into a unified 256-dimensional vector space. This is then fused through element-wise addition to generate a 256-dimensional path aggregation unit representation vector that independently expresses the semantic information of each path. To represent the relevance of each aggregation unit to the production line early warning target, a target query-oriented attention network model is input. This attention network model is a single-layer attention computation network containing inner product scoring nodes and Softmax normalization nodes. The inputs are the target query vector and the representation vectors of each path aggregation unit, and the output is the fused feature vector.
[0039] The target query vector, also mapped to 256 dimensions, is extracted. Specifically, the query entity, predicted relation, unknown target entity, and query time in the target query are vectorized. The query entity embedding is obtained by fusing the general embedding of the corresponding entity with the state value embedding; the predicted relation embedding is obtained by looking up a table from a preset relation embedding dictionary based on the predicted relation identifier; the unknown target entity uses a preset trainable placeholder embedding representation; and the query time is mapped to a time embedding vector through a time encoding function. The query entity embedding, predicted relation embedding, unknown target entity placeholder embedding, and query time embedding are concatenated along the feature dimension and input into a query encoding network containing a linear mapping layer and a nonlinear activation function. After dimensionality reduction mapping, a 256-dimensional target query vector is obtained, used to represent the semantic direction of the current anomalous query task. The target query vector is then subjected to an inner product operation with the representation vector of each path aggregation unit.
[0040] Assuming there are three convergence paths with calculated attention scores of 1.5, 0.8, and 2.1, the tensors formed by these three unnormalized scores are input into the Softmax activation function to perform exponential summation, yielding attention weights of 0.31, 0.15, and 0.54 for each path. Using tensor broadcasting, the three 256-dimensional path aggregation unit representation vectors are multiplied by their corresponding weight coefficients of 0.31, 0.15, and 0.54. Then, the three weighted feature vectors are summed bitwise, and the attention network model outputs a 256-dimensional fused feature vector. The weighted fusion calculation process is represented as follows: Where Q is the target query vector, Let the vector represent the i-th path aggregation unit. This is the output fused feature vector, used to highlight path aggregation units that are highly similar to the target query vector. Attention scores and weights are as follows: Figure 2 As shown.
[0041] S5 uses the reasoning path to calculate the confidence level of the target query as the probability of anomaly occurrence, and records the total number of feasible reasoning paths and the variance of the score of each path.
[0042] The calculated weighted aggregate representation vector of the endpoint entity and the target query vector are jointly input into the constructed classifier network. The last layer applies a sigmoid activation function to map the output value to the real number space of 0 to 1 as the confidence score of the fact stated in the target query. This confidence score is assigned to the production line anomaly probability variable. All complete inference paths under the current target query are traversed in memory. For each complete inference path, the path scores of each hop affected by the time interval are multiplied sequentially to obtain the path score of the complete inference path. A minimum score threshold is set, and invalid paths below the threshold are eliminated. The length of the remaining path list is counted as the total number of feasible inference paths. When the total number of feasible reasoning paths is 0, it is determined that the current target query lacks valid reasoning evidence. The division calculation of the average and variance of the path scores is not performed. The variance of each path score is set to a preset default variance value, and the statistical result that the total number of feasible reasoning paths is 0 is input into the subsequent warning threshold adjustment step. When the total number of feasible reasoning paths is greater than 0, the path scores calculated by the above feasible paths in the path expansion stage are extracted to form a one-dimensional floating-point array. The variance of the one-dimensional array is calculated to obtain the variance value of each path score representing the degree of divergence in the reasoning process.
[0043] The classifier network is a feedforward neural network used to map path aggregation features to target query confidence. Its input is a joint feature vector formed by concatenating the weighted aggregation representation vector of the endpoint entity and the target query vector along the feature dimension. The network structure includes an input layer, at least one hidden fully connected layer, and an output layer. The hidden fully connected layer is used to perform non-linear interactive mapping between path evidence information and query semantic information. ReLU, LeakyReLU, or Tanh activation functions and Dropout layers can be added after the hidden layer to enhance the model's generalization ability. The output layer uses a single-neuron linear layer to generate a real-valued confidence score, and applies a sigmoid activation function in the last layer to compress the confidence score to the range of 0 to 1, which serves as the confidence that the abnormal fact in the target query is true, i.e., the probability of production line abnormality.
[0044] In one implementation, the recording of the total number of feasible inference paths and the variance of the scores for each path includes: Inference paths with a score greater than a preset feasibility threshold are identified as feasible inference paths, and the total number of feasible inference paths corresponding to the target query is counted. Obtain the path scores for all feasible inference paths and calculate the average score; Calculate the square of the difference between the score of each feasible reasoning path and the average value, sum all the squares and divide by the total number of feasible reasoning paths to obtain the variance of the score of each path.
[0045] To eliminate low-quality or uncertain inference results, a threshold parameter for determining path reliability is pre-set in the configuration file. This threshold typically ranges from 0.50 to 0.60, with a default value of 0.55 here. After each round of multi-hop logical inference and the output of a candidate path cluster, the scores of each path are compared sequentially. Paths with scores higher than 0.55 are retained and marked as feasible inference paths. The total number of feasible inference paths for the specific production line's abnormal query is counted, assuming that 5 feasible paths are retained after filtering. The path scores of these 5 feasible inference paths are extracted one by one. Assuming the actual calculated values are 0.60, 0.70, 0.75, 0.85, and 0.90, the sum of these 5 floating-point values is divided by the total number of 5 to calculate the average score of the current path cluster, which is 0.76. The data distribution dispersion calculation stage begins by sequentially calculating the squares of the differences between each individual score and the average value of 0.76, yielding values of 0.0256, 0.0036, 0.0001, 0.0081, and 0.0196. These squared terms, encompassing all deviation magnitudes, are summed to obtain a total deviation sum of squares of 0.057. Dividing this sum by the total number of feasible inference paths (5) yields a variance parameter of 0.0114, representing the cohesion and consistency of the inference evidence in this round. This step uses statistical methods to demonstrate the stability of the early warning evidence chain.
[0046] S6. Adjust the warning threshold according to the total number of feasible reasoning paths and the variance of the scores of each path. When the probability of an anomaly occurs exceeds the adjusted warning threshold, output the warning information for the production line.
[0047] A basic anomaly warning threshold constant is preset, and a threshold calculation formula is constructed. The adjusted warning threshold equals the basic anomaly warning threshold plus (variance penalty coefficient multiplied by the variance of each path score), and then subtracts (path number reward coefficient multiplied by the total number of feasible reasoning paths). The variance penalty coefficient and path number reward coefficient are both obtained through optimization using a grid search algorithm on historical anomaly datasets, ensuring a negative correlation with the total number of feasible reasoning paths and a positive correlation with the variance of each path score. After calculation, a mathematical truncation operation is performed on the result. The lower bound parameter is set to 0.0 and the upper bound parameter is set to 1.0 to ensure that the adjusted warning threshold is limited to the range of 0 to 1. If the probability of an anomaly occurrence is strictly greater than this warning threshold, the system alarm mechanism is triggered. Severity-level anomaly logs are generated, and JSON format warning information containing the abnormal device number and anomaly type is pushed to the distributed central control screen in the factory workshop using RabbitMQ message queue middleware.
[0048] In one implementation, adjusting the warning threshold based on the variance of the total number of feasible inference paths and the score of each path includes: Obtain the preset initial warning threshold; The first adjustment term is obtained by multiplying the variance by a preset variance penalty coefficient, and the second adjustment term is obtained by multiplying the path number reward coefficient by the total number of feasible inference paths. The initial warning threshold is added to the first adjustment term and the second adjustment term is subtracted. The calculation result is then restricted to the range of 0 to 1 by a truncation operation or activation function to obtain the adjusted warning threshold.
[0049] The initial warning threshold, pre-trained and debugged offline, is loaded, with the baseline trigger parameter set to 0.80. During threshold correction, a variance penalty coefficient within the preferred range of 1.0 to 5.0 is extracted (2.0 in this example). This penalty coefficient is multiplied by the path score variance calculated by the pre-module, for example, 0.0114, yielding a first adjustment term of 0.0228. A path quantity reward coefficient within the preferred range of 0.01 to 0.10 is extracted (0.02 in this example). This reward coefficient is multiplied by the total number of feasible inference paths, for example, 5, yielding a second adjustment term of 0.10. Linear addition and subtraction are then performed, resulting in a calculation of 0.7228. This 0.7228 is then truncated to the range of 0 to 1, and output as the updated warning threshold for this round of target warning queries. A warning command will only be sent to the operating terminal when the probability of an anomaly exceeds this value.
[0050] The experiment used an industrial production line fault monitoring knowledge graph dataset as the testing basis, and the evaluation metrics selected were early warning accuracy, recall, and comprehensive evaluation score. The comparison models included a basic model with all improved modules removed, a variant one model that only introduced a state-value-specific projection module, a variant two model that further introduced time decay and attention aggregation mechanisms based on variant one, and a complete scheme model including modules such as early warning threshold adjustment. All models completed 10,000 iterations of training and independent testing under the same hardware computing power and unified basic hyperparameter settings.
[0051] Test results show that the basic model achieved a warning accuracy of 75.2%, a recall of 73.5%, and a comprehensive evaluation score of 74.3%; Variant 1 achieved an accuracy of 79.4%, a recall of 77.6%, and a comprehensive score of 78.5%; Variant 2 achieved an accuracy of 84.1%, a recall of 82.8%, and a comprehensive score of 83.4%; and the complete solution model achieved an accuracy of 88.7%, a recall of 89.3%, and a comprehensive score of 89.0%. Figure 3 As shown.
[0052] The state-value-specific projection module improves the accuracy of multi-source heterogeneous entity representation by distinguishing between continuous numerical values and discrete state features. Time decay and attention aggregation mechanisms can reduce interference from outdated historical anomaly data to some extent and highlight causal transmission links with high semantic relevance to the warning target, making feature fusion more focused. The warning threshold adjustment strategy adjusts the system trigger sensitivity based on the total number of feasible inference paths and the variance of path scores, reducing the probability of missed and false alarms under complex operating conditions, and demonstrating good applicability of anomaly warnings under the aforementioned test conditions.
[0053] Based on any of the above embodiments, this application also provides a time-series-based method for early warning of anomalies in an instant noodle production line, comprising the following modules: The execution module is used to collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph. The computation module is used to perform state-value-specific projection on entities according to their type, and nonlinearly fuse general embeddings and state-value embeddings to generate initial entity embeddings; in path expansion, a time decay function is applied to adjust the time decay rate according to the confidence of the path segments before the current step, and to calculate the impact of time intervals on path scores; when multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism. The early warning module is used to calculate the confidence level of the target query as the probability of an anomaly by using the inference path, record the total number of feasible inference paths and the variance of the score of each path, adjust the early warning threshold according to the total number of feasible inference paths and the variance of the score of each path, and output early warning information to the production line when the probability of an anomaly exceeds the adjusted early warning threshold.
[0054] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0055] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for instant noodle production line anomaly early warning based on timing characteristics, characterized in that, Includes the following steps: Collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph; Based on the type, state-value specific projection is performed on the entity, and the general embedding and state-value embedding are non-linearly fused to generate the initial entity embedding. In path expansion, a time decay function is applied to adjust the time decay rate based on the confidence of the path segment before the current step, and the impact of the time interval on the path score is calculated. When multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism. The confidence level of the target query is calculated using the inference path as the probability of an anomaly. The total number of feasible inference paths and the variance of the score of each path are recorded. The warning threshold is adjusted according to the total number of feasible inference paths and the variance of the score of each path. When the probability of an anomaly exceeds the adjusted warning threshold, a warning message is output to the production line.
2. The method of claim 1, wherein, The step of performing state-value-specific projection on entities according to type and nonlinearly fusing general embeddings and state-value embeddings to generate initial entity embeddings includes: Determine the type of the entity's state value; if it is a continuous value, use a multilayer perceptron to map the continuous value into a state value embedding vector; if it is a discrete state, obtain the corresponding state value embedding vector through a preset embedding dictionary. The general embedding vector of the entity is concatenated with the state value embedding vector and input into a fully connected network containing a nonlinear activation function, and the fused initial entity embedding is output.
3. The method of claim 1, wherein, The application of a time decay function in path expansion, adjusting the time decay rate based on the confidence level of the path segments before the current step, and calculating the impact of time intervals on path scores, includes: Obtain the confidence level of the path segment before the current inference step, calculate the difference between the path segment confidence level and the preset constant greater than the upper limit of the path segment confidence level, and use the difference as an adjustment coefficient; Calculate the time interval between the timestamp of historical facts and the current inference timestamp; The dimensionless correction exponent is obtained by multiplying the adjustment coefficient, the time interval, and the preset base decay parameter with the reciprocal unit of time. The negative exponent of the correction exponent is calculated with the natural constant e as the base as the time decay coefficient. The coefficient is then multiplied by the original transition probability score corresponding to the selected action in the current inference step to obtain the current jump path score affected by the time interval.
4. The method according to claim 2 or 3, characterized in that, When multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit. This aggregation unit is then weighted using a target query-oriented attention mechanism, including: After mapping the endpoint relationship embedding vector and the endpoint entity embedding vector of each reasoning path to a unified dimension, they are added element by element to obtain the corresponding path aggregation unit representation vector. The inner product of the target query vector mapped to the unified dimension and the representation vectors of each path aggregation unit is calculated as the attention score; The attention scores of all paths are normalized using the Softmax function to obtain the attention weights for each path. The aggregation unit representation vectors of each path are multiplied by their corresponding attention weights and summed to obtain a fused feature vector pointing to the same entity.
5. The method of claim 1, wherein, The variance of the total number of feasible reasoning paths and the score of each path includes: Inference paths with a score greater than a preset feasibility threshold are identified as feasible inference paths, and the total number of feasible inference paths corresponding to the target query is counted. Obtain the path scores for all feasible inference paths and calculate the average score; Calculate the square of the difference between the score of each feasible reasoning path and the average value, sum all the squares and divide by the total number of feasible reasoning paths to obtain the variance of the score of each path.
6. The method of claim 1, wherein, The adjustment of the early warning threshold based on the variance of the total number of feasible reasoning paths and the score of each path includes: Obtain the preset initial warning threshold; The first adjustment term is obtained by multiplying the variance by a preset variance penalty coefficient, and the second adjustment term is obtained by multiplying the path number reward coefficient by the total number of feasible inference paths. The initial warning threshold is added to the first adjustment term and the second adjustment term is subtracted. The calculation result is then restricted to the range of 0 to 1 by a truncation operation or activation function to obtain the adjusted warning threshold.
7. A system for early warning of instant noodle production line abnormalities based on timing characteristics, characterized in that, Includes the following modules: The execution module is used to collect equipment status, process parameters and material information of the production line, and construct a sparse temporal knowledge graph containing entities, relationships and timestamps; set target queries for abnormal events of the instant noodle production line, and perform multi-hop logical reasoning on the sparse temporal knowledge graph. The computation module is used to perform state-value-specific projection on entities according to their type, and to nonlinearly fuse the general embedding and the state-value embedding to generate the initial entity embedding. In path expansion, a time decay function is applied to adjust the time decay rate based on the confidence of the path segment before the current step, and the impact of the time interval on the path score is calculated. When multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit, and the aggregation unit is weighted through a target query-oriented attention mechanism. The early warning module is used to calculate the confidence level of the target query as the probability of an anomaly by using the inference path, and to record the total number of feasible inference paths and the variance of the score of each path. The warning threshold is adjusted based on the total number of feasible reasoning paths and the variance of the scores of each path. When the probability of an anomaly occurs exceeds the adjusted warning threshold, a warning message is output to the production line.
8. The system according to claim 7, characterized in that, The step of performing state-value-specific projection on entities according to type and nonlinearly fusing general embeddings and state-value embeddings to generate initial entity embeddings includes: Determine the type of the entity's state value; if it is a continuous value, use a multilayer perceptron to map the continuous value into a state value embedding vector; if it is a discrete state, obtain the corresponding state value embedding vector through a preset embedding dictionary. The general embedding vector of the entity is concatenated with the state value embedding vector and input into a fully connected network containing a nonlinear activation function, and the fused initial entity embedding is output.
9. The system according to claim 7, characterized in that, The application of a time decay function in path expansion, adjusting the time decay rate based on the confidence level of the path segments before the current step, and calculating the impact of time intervals on path scores, includes: Obtain the confidence level of the path segment before the current inference step, calculate the difference between the path segment confidence level and the preset constant greater than the upper limit of the path segment confidence level, and use the difference as an adjustment coefficient; Calculate the time interval between the timestamp of historical facts and the current inference timestamp; The dimensionless correction exponent is obtained by multiplying the adjustment coefficient, the time interval, and the preset base decay parameter with the reciprocal unit of time. The negative exponent of the correction exponent is calculated with the natural constant e as the base as the time decay coefficient. The coefficient is then multiplied by the original transition probability score corresponding to the selected action in the current inference step to obtain the current jump path score affected by the time interval.
10. The system according to claim 7, characterized in that, When multiple paths point to the same entity, the endpoint relationship and the entity are combined to form an aggregation unit. This aggregation unit is then weighted using a target query-oriented attention mechanism, including: After mapping the endpoint relationship embedding vector and the endpoint entity embedding vector of each reasoning path to a unified dimension, they are added element by element to obtain the corresponding path aggregation unit representation vector. The inner product of the target query vector mapped to the unified dimension and the representation vectors of each path aggregation unit is calculated as the attention score; The attention scores of all paths are normalized using the Softmax function to obtain the attention weights for each path. The aggregation unit representation vectors of each path are multiplied by their corresponding attention weights and summed to obtain a fused feature vector pointing to the same entity.