Information change triggering method for MES system
Patent Information
- Application Number
- CN202611079738.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-07-21
AI Technical Summary
[0004]然而现有技术存在以下缺陷:定时轮询存在分钟级到小时级的检测延迟易导致生产计划基于过期数据制定,简单通知缺乏变更内容的自动比对与差异提取,规则引擎仅支持单一维度匹配无法结合字段级取值约束、时间窗口和用户角色等多维度条件,电子物料清单变更时无法自动识别对上层父件、下层子件及关联SMT贴片工序物料的生产订单、采购订单和库存记录的影响,变更审批后受影响的关联任务仍需各岗位人员手动创建和分配,这些缺陷导致企业变更处理效率低下、影响范围遗漏频发、跨部门协作成本高昂,因此需要一种能够实现变更自动捕获、多维度规则匹配、审批流动态触发、影响范围智能计算和关联任务自动生成的MES系统信息变更触发方法
[0013]本发明的有益效果:(1)通过步骤S1到S3的事件捕获、分类与规则匹配,实现了MES系统中数据变更的毫秒级实时响应,相较于现有定时轮询技术消除了分钟级到小时级的检测延迟,避免了因变更信息滞后导致的生产计划基于过期数据制定的风险;
Smart Images

Figure CN122614856B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an information change triggering method for MES systems. Background Technology
[0002] Manufacturing Execution Systems (MES) undertake core production functions such as SMT placement, PCB assembly, and component management in the electronics manufacturing industry. They are also widely used in discrete manufacturing fields such as automotive parts. With the increasing demand for customized electronic products and the shortening of product lifecycles, core data in the MES system, such as electronic bill of materials, sales orders, purchase orders, and SMT process routes, are frequently changing. An efficient change triggering and propagation mechanism is crucial to ensuring the accuracy of production plans and the timeliness of material supply.
[0003] Existing MES systems typically use manual inspection or periodic polling to detect data changes. For example, the system scans the data table every few hours, modifies the timestamp, and notifies relevant personnel via email. Some systems introduce database triggers to send notification messages containing the changed table name and primary key. Some systems provide a change approval workflow module, but the approver needs to manually select the affected objects and create subsequent tasks. A few systems attempt to introduce a rule engine to match preset processing procedures based on the changed table name.
[0004] However, existing technologies have the following drawbacks: timed polling has a detection delay ranging from minutes to hours, which can easily lead to production plans being based on outdated data; simple notifications lack automatic comparison and difference extraction of changed content; rule engines only support single-dimensional matching and cannot combine multi-dimensional conditions such as field-level value constraints, time windows, and user roles; when the electronic bill of materials changes, it cannot automatically identify the impact on production orders, purchase orders, and inventory records of upper-level parent components, lower-level child components, and related SMT placement process materials; after change approval, the affected related tasks still need to be manually created and assigned by personnel in each position. These defects lead to low efficiency in enterprise change processing, frequent omissions of the scope of impact, and high costs for cross-departmental collaboration. Therefore, there is a need for an MES system information change triggering method that can achieve automatic change capture, multi-dimensional rule matching, dynamic triggering of approval flow, intelligent calculation of the scope of impact, and automatic generation of related tasks. Summary of the Invention
[0005] A method for triggering information changes in an MES system includes the following steps: S1. Change Event Capture: Real-time monitoring of the database operation logs of at least one business module in the MES system. When a new or modified operation is detected in any data record of at least one preset monitoring data table, the change information of the data record is encapsulated into a change event object. S2. Change type classification: Read the change source data table identifier in the change event object, match it with the preset change type mapping table, and determine the change type to which the change event belongs; S3. Change rule matching: Based on the change type determined in step S2, at least one change rule associated with the change type is retrieved from the preset change rule library. Each change rule contains a trigger condition expression and at least one action instruction. The trigger condition expression contains at least the field-level conditions of the change record, the time window conditions, and the user role conditions. S4. Approval flow trigger determination: For each matched change rule, its trigger condition expression is decomposed into three sub-items: field-level condition, time window condition, and user role condition, and a comprehensive determination is made. If and only if all three sub-items are satisfied, the approval flow engine of the MES system is called to generate a change approval task instance according to the preset approval flow identifier in the rule. S5. Change content comparison and difference extraction: When the change approval task instance enters the approval node, the data records before and after the change are extracted from the MES system database using the key value of the change record in the change event object as the index. The data is compared field by field to generate a change difference vector to represent the difference information of the changed fields. S6. Calculation of the scope of related impact: Based on the change difference vector generated in step S5, and combined with the electronic bill of materials structure tree and electronic assembly process route map pre-generated in the MES system, a recursive traversal process is executed. The starting node is the material code corresponding to the change source record. When the change source record belongs to the order change, the starting node also includes the order number. The path distance is recorded by traversing up and down in the electronic bill of materials structure tree. Then, other electronic material nodes involved in the related mounting process are found in the electronic assembly process route map to generate a set of related impacts. The impact weight value is calculated for each affected record in the set. S7. Automatic generation of associated tasks: Based on the associated impact set generated in step S6, automatically create a corresponding transaction execution task for each affected data table record identifier in the set, and push the transaction execution task to the to-do list of the corresponding role user.
[0006] Furthermore, in a method for triggering information changes in an MES system, step S1 includes the following specific steps; S11. Listener hook configuration: Embed change listener hooks in the database operation layer of each business module of the MES system. These change listener hooks intercept operation requests before the data record insertion or update operation is executed, and extract the operation type and primary key information of the data record. S12. Monitoring table comparison: Compare the intercepted operation request information with the preset monitoring data table list. If the data table targeted by the operation request is in the monitoring data table list, then execute step S13; otherwise, allow the operation request and terminate the subsequent triggering process. S13. Change Information Extraction: Extract the change type identifier, change source data table identifier, and key value of the change record from the operation request. The change type identifier includes the addition identifier and the modification identifier. The modification identifier is further subdivided into single-field modification identifier and multi-field modification identifier. S14. Object encapsulation: Obtain the current system time as the change timestamp, and encapsulate the information extracted in step S13 together with the change timestamp into a change event object; S15. Asynchronous Enqueue: The encapsulated change event object is added to the asynchronous processing queue. If the waiting time in the asynchronous processing queue exceeds a preset packet loss threshold, the change event object is discarded. This packet loss threshold is represented by a variable. This indicates that the unit is milliseconds (ms), and its value range is 5000 < ms. <30000.
[0007] Furthermore, in a method for triggering information changes in an MES system, step S2 includes the following specific steps; S21. Table Identifier Parsing: Parse the source data table identifier in the change event object, and extract the business module category and table function tag to which the data table belongs; S22. Mapping table matching: Perform a hash lookup in the preset change type mapping table using the change source data table identifier as the key value. The change type mapping table stores a set of key-value pairs from the data table identifier to the change type code. S23. Fine-grained type determination: If the matched change type is an electronic bill of materials change type, then further read the field name of the changed field in the change record, and determine whether it is an electronic component replacement change, electronic material usage adjustment change or material tag number update change according to the change subdivision rule corresponding to the field name; S24. Type Result Output: Outputs a modified type-encoded object. ,in Primary type identifier, For subtype identification, when there is no sub-type It is an empty value.
[0008] Furthermore, in a method for triggering information changes in an MES system, step S3 includes the following specific steps; S31. Rule base retrieval: Using the change type code determined in step S2 as the retrieval index, read the list of all associated rule identifiers from the change rule base, which is stored using an inverted index structure; S32. Rule Instantiation: For each rule identifier in the rule identifier list, load its rule definition body from the rule base. The rule definition body contains an abstract syntax tree of the triggering condition expression and a sequence of action instructions. S33. Condition Pre-check: Quickly validate the field-level conditions in the triggering condition expression, extract the current value of the corresponding field in the current change event object, and determine whether it meets the value range or enumeration value constraint in the field-level condition. If it does not meet the constraint, skip the rule. S34. Rule Output: Output all rules that have passed the pre-check in step S33, along with their instantiated trigger condition expressions and action instruction sequences.
[0009] Furthermore, in a method for triggering information changes in an MES system, step S4 includes the following specific steps; S41. Field-level condition evaluation: For field-level conditions in change rules, verify whether the current value of the corresponding field in the change record falls within the condition value range defined for that field-level condition. Define the field-level condition evaluation function as follows: ,in This is the current value of the k-th condition field. This is the conditional value range for this field. This is an indicator function that, when all condition fields are satisfied... =1 otherwise 0; S42. Time Window Condition Evaluation: Get the current system timestamp Determine whether it falls within the valid time window defined by the change rule. , Within [the specified area], the time window condition evaluation function is defined as follows: If the condition is met, take 1; otherwise, take 0. S43. Role Condition Evaluation: Retrieves the set of role identifiers for the currently operating user. The set of roles specified by the definition rule is The function for evaluating the character conditions is: If there is an intersection, take 1; otherwise, take 0. S44. Approval workflow identifier acquisition: If If =1, then extract the approval flow identifier field value from the action instruction sequence of the change rule; S45. Task Instance Generation: Call the MES system's approval flow engine interface, passing in the approval flow identifier and the key-value pair of the change event object. The engine generates a change approval task instance based on the predefined approval process template. The approval time limit parameter of this instance... Duration is defined by rules in the template. Multiply by the safety factor S and round up to get the result. The safety factor S has a value range of 1.2 < S < 1.5. The unit is hours.
[0010] Furthermore, in a method for triggering information changes in an MES system, step S5 includes the following specific steps; S51. Historical Record Extraction: Using the key value of the change record in the change event object as an index, retrieve the most recent commit record corresponding to that key value from the historical record table of the MES system database as the data record before the change. Use the latest record in the current database as the updated data record. ; S52. Field-level traversal: [This refers to...] and Iterate through all fields in the array, and for each field j, compare... and Are they equal? S53. Difference label: If If so, mark the field as a difference field and record the field name. Value before the change Value after change And generate a change type label for the difference field based on the semantic rules of the field name. The change type label is used to indicate the semantic category of the field change, including at least one of numerical increase, numerical decrease, text replacement, and association key change. S54. Vector Construction: Sort all records corresponding to the difference fields by field name and concatenate them into a change difference vector. Each component , where m is the total number of difference fields.
[0011] Furthermore, in a method for triggering information changes in an MES system, step S6 includes the following specific steps; S61. Starting Node Location: The electronic material code corresponding to the change source record shall be used as the starting node. When the change source record pertains to an order change, the starting node further includes the order number in the electronic bill of materials (OBM) structure tree. Locate the node in the middle; S62. Upward recursive traversal: from Traverse upwards to the root node and record the set of all parent nodes. and each node arrive path distance The path distance is calculated based on the electronic bill of materials hierarchy difference; S63. Downward recursive traversal: from Traverse downwards to all leaf nodes and record the set of all child nodes. and each node arrive path distance The path distance is calculated based on the electronic bill of materials hierarchy difference; S64. Process Dependency Extension: For Each node in In the electronic assembly process roadmap Search in For the mounting process p that corresponds to the input or output of electronic materials, other electronic material nodes associated with this process are added to the associated influence set. Simultaneously record the distance of process dependencies. This distance is calculated by summing the edge weights of adjacent processes in the process route diagram, with a default edge weight of 1. S65. Weight Calculation: For the set of related influences Each affected record in Define its overall impact weight as follows: in and These are the weighting coefficients. =0.6, =0.4, =0.1 is the smoothing factor; then for All nodes L2 norm normalization is performed to obtain the final influence weight values. .
[0012] Furthermore, in a method for triggering information changes in an MES system, step S7 includes the following specific steps; S71. Task Type Determination: Based on the data table type to which the affected record in the associated impact set belongs, the task type identifier of the task is set to one of the following: production plan adjustment type, purchase order update type, or inventory reservation change type. S72. Priority Calculation: Based on the impact weight value of the affected record. And the urgency level of the mounting process corresponding to the affected record in the electronic assembly process roadmap. Calculate the execution priority value Among them, the urgency level The value ranges from 1 to 3, corresponding to ordinary processes, key processes, and bottleneck processes, respectively; S73. Recommended Operation Matching: Change the Difference Vector With the set of related effects The joint features are input into a preset operation recommendation library, which uses a decision tree model and outputs the operation guidance text Guide that has the highest matching degree with the joint features. S74. Task Push: After encapsulating the transaction execution task in JSON data format, call the MES system's to-do task interface to insert the task into the to-do task list database of the corresponding role user, and trigger a real-time notification on the front-end interface.
[0013] The beneficial effects of the present invention are: (1) Through event capture, classification and rule matching in steps S1 to S3, the millisecond-level real-time response to data changes in the MES system is realized. Compared with the existing timed polling technology, the detection delay from minute to hour is eliminated, and the risk of production plan being based on expired data due to the lag of change information is avoided. (2) The security factor introduced in step S4 allows for a configurable approval time limit mechanism, with the approval time limit... This design solves the problem that fixed approval time limits are either too tight, leading to timeouts, or too loose, leading to inefficiency. Statistical analysis of 200 actual electronic bill of materials change approvals shows that when S is 1.3, it can cover 85% of abnormal delay scenarios and the average additional waiting time only increases by 18%, achieving the best balance between reliability and efficiency. (3) Through the construction of the change difference vector in step S5, the field-by-field comparison of records before and after the change is automatically completed, and a structured vector is generated. The system outputs the field name, value before change, value after change, and change type label for each difference item, allowing approvers to understand the specific changes without manually sifting through multiple lines of records, thus improving approval decision-making efficiency by more than 50%. (4) A multidimensional recursive influence range calculation algorithm was constructed through step S6, which calculates the path distance in the electronic bill of materials structure tree. Process dependency distance in electronic assembly process roadmap Perform weighted fusion, weight coefficient =0.6, =0.4, overall influence weight Then, L2 norm normalization is performed. This algorithm can automatically identify all the impacts of changes on the upper parent component, lower child component and related mounting process materials. The accuracy of impact range identification is over 95% in complex products with an electronic bill of materials depth of more than 5 layers. (5) By automatically generating and pushing associated tasks in step S7, each object in the affected set is automatically converted into an executable transaction task, and recommended operation guidance is matched based on the decision tree model, realizing full-process automation from the occurrence of change to the issuance of downstream tasks. The average cycle of change processing is shortened from the original 4 hours to less than 10 minutes. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating an information change triggering method for an MES system. Detailed Implementation
[0015] Example 1: A method for triggering information changes in an MES system includes the following steps: S1. Change Event Capture: Real-time monitoring of the database operation logs of at least one business module in the MES system. When a new or modified operation is detected in any data record of at least one preset monitoring data table, the change information of the data record is encapsulated into a change event object. S2. Change type classification: Read the change source data table identifier in the change event object, match it with the preset change type mapping table, and determine the change type to which the change event belongs; S3. Change rule matching: Based on the change type determined in step S2, at least one change rule associated with the change type is retrieved from the preset change rule library. Each change rule contains a trigger condition expression and at least one action instruction. The trigger condition expression contains at least the field-level conditions of the change record, the time window conditions, and the user role conditions. S4. Approval flow trigger determination: For each matched change rule, its trigger condition expression is decomposed into three sub-items: field-level condition, time window condition, and user role condition, and a comprehensive determination is made. If and only if all three sub-items are satisfied, the approval flow engine of the MES system is called to generate a change approval task instance according to the preset approval flow identifier in the rule. S5. Change content comparison and difference extraction: When the change approval task instance enters the approval node, the data records before and after the change are extracted from the MES system database using the key value of the change record in the change event object as the index. The data is compared field by field to generate a change difference vector to represent the difference information of the changed fields. S6. Calculation of the scope of related impact: Based on the change difference vector generated in step S5, and combined with the electronic bill of materials structure tree and electronic assembly process route map pre-generated in the MES system, a recursive traversal process is executed. The starting node is the material code corresponding to the change source record. When the change source record belongs to an order change, the starting node also includes the order number. The path distance is recorded by traversing up and down in the electronic bill of materials structure tree. Then, other electronic material nodes involved in the related mounting process are found in the electronic assembly process route map to generate a set of related impacts. The impact weight value is calculated for each affected record in the set. S7. Automatic generation of associated tasks: Based on the associated impact set generated in step S6, automatically create a corresponding transaction execution task for each affected data table record identifier in the set, and push the transaction execution task to the to-do list of the corresponding role user.
[0016] Furthermore, in a method for triggering information changes in an MES system, the key parameters for capturing the change event in step S1 are set as follows: Packet loss threshold The value range is set to 5000ms to 30000ms, and the reason for this setting is as follows: When When the timeframe is less than 5000ms, network jitter or database write spikes may cause a large number of normal change events to wait in the queue for longer than this threshold and be mistakenly discarded, resulting in missed change processing and thus production planning defects; when When the latency exceeds 30000ms, prolonged backlog of change events in the queue can cause delays in subsequent approvals and task generation that exceed the enterprise's acceptable response time limit; the optimal solution is... =15000ms, the reason being that in actual MES system stress tests, 99% of change events can be consumed normally within 15000ms, and this duration is far less than the enterprise's required change processing service level agreement limit of 30 minutes.
[0017] Furthermore, in an information change triggering method for an MES system, the approval flow triggering determination in step S4 has the following key parameter settings: First, the setting of the safety factor S: approval time limit parameter. ,in The standard time limit is defined for the rule, and S is a safety factor ranging from 1.2 to 1.5. The rationale for setting this value is as follows: the time limit defined for the rule is usually estimated based on the standard operating procedure, but in actual approval, there may be abnormal situations such as the person in charge of the approval node temporarily leaving their post or the need to supplement materials. When S < 1.2, the buffer is insufficient, and the probability of approval timeout exceeds 30% in abnormal scenarios. When S > 1.5, the approval time limit is too long, which indirectly reduces the overall processing efficiency. Through statistical analysis of 200 actual electronic bill of materials change approvals, S = 1.3 can cover 85% of abnormal delay scenarios and the average additional waiting time only increases by 18%, achieving the best balance between reliability and efficiency. Therefore, the optimal solution for S is 1.3. Second, the definition of conditional evaluation functions: Field-level conditional evaluation functions are defined as follows: ,in This is the current value of the k-th condition field. This is the conditional value range for this field. This is an indicator function that, when all condition fields are satisfied... =1 otherwise 0; the time window conditional evaluation function is defined as follows: ,in For the current system timestamp, [ , [ ] represents the valid time window defined by the rule; it is set to 1 if the condition is met, and 0 otherwise. The role condition evaluation function is defined as follows: ,in This is the set of role identifiers for the currently operating user. The set of roles specified by the rule is set to 1 if there is an intersection, otherwise it is set to 0.
[0018] Furthermore, in an information change triggering method for an MES system, the key parameter settings for the change content comparison and difference extraction in step S5 are as follows: Change Difference Vector Defined as Each component , where m is the total number of difference fields. For field names, The value before the change, To retrieve the value after the change, This is a change type label used to indicate the semantic category of the field change. As an example and not a limitation, the change type label can be num_increase to indicate numerical increase, num_decrease to indicate numerical decrease, text_replace to indicate text replacement, or key_change to indicate association key change. In actual applications, more types can be extended according to the business needs of the MES system, such as date change type, enumeration switching type, etc.
[0019] Furthermore, in an information change triggering method for an MES system, the key parameters for calculating the scope of related impact in step S6 are set as follows: First, the formula for calculating the comprehensive impact weight is defined as follows: ,in For affected nodes The path distance to the change source node in the electronic bill of materials structure tree. This represents the distance between this node and the component placement process in the electronic assembly process roadmap, relative to the node from which the change originated. and These are the weighting coefficients. It is a smoothing factor; Second, the logic for setting the weighting coefficients: =0.6, =0.4; The rationale for setting this value is as follows: In discrete manufacturing scenarios, the hierarchical relationships in the electronic bill of materials (BOM) structure tree typically have a greater impact on production than the dependencies between processes. This is because errors in the material hierarchy directly lead to material shortages or incorrect materials, while process dependencies can be partially mitigated by adjusting the production sequence. Using the analytic hierarchy process (AHP) to calculate the scoring matrix, the geometric mean of the BOM weights is 0.58, and the process dependency weight is 0.42. Therefore, the value is set to 0.4. =0.6, =0.4; Third, smoothing factor The logic for setting =0.1 is to avoid when... =0 and When the denominator is zero, the impact weight of changing the source node itself is limited to 1 / 0.1 = 10. Fourth, normalization method: L2 norm normalization is used, that is... This ensures that the sum of the squares of all influencing weights is 1, which facilitates the numerical stability of subsequent priority calculations.
[0020] Furthermore, in an information change triggering method for an MES system, the associated task mentioned in step S7 is automatically generated, and its key parameters are set as follows: The formula for calculating execution priority is: ,in The influence weight value calculated in step S6, The urgency level of the mounting process corresponding to the affected record in the electronic assembly process roadmap; The value range is from 1 to 3. =1 corresponds to a normal process. =2 corresponds to the key process. =3 corresponds to the bottleneck process; the reason for setting it is that the urgency level is obtained by normalizing the total working time, equipment scarcity and downstream buffer time of each process in the electronic assembly process roadmap. The linear mapping from 1 to 3 facilitates the rapid calculation of priority values and maintains the same magnitude as the influence weight.
[0021] Example 2: Bill of Materials Replacement / Change Scenario A method for triggering information changes in an MES system includes the following steps: In step S1, change event capture is specifically implemented as follows in this embodiment: When the resistor with material code R1206_10K in the electronic bill of materials table bom_item in the MES system of an electronics manufacturing enterprise is modified to R1206_10K_1% high-precision resistor, the change listening hook of the database operation layer intercepts the UPDATE operation, extracts the operation type as modification identifier, the change source data table identifier as bom_item, and the key value of the change record as R1206_10K, and sends the encapsulated change event object to the asynchronous processing queue. The actual waiting time in this case is 230ms, which is far lower than the packet loss threshold set in embodiment one. =15000ms, the event was processed normally; In step S2, the change type is classified, which is specifically implemented as follows in this embodiment: The change source data table identifier `bom_item` is parsed, and the main type is matched as an electronic bill of materials change type in the change type mapping table; further, the field names of the changed fields in the change record are read, and it is found that the changed field is the material code and the associated substitute material identifier field is updated simultaneously. Therefore, the subtype of this change is determined to be an electronic component replacement change, and the change type code object is output. =(BOM_CHANGE,MAT_REPLACE); In step S3, the matching rules are changed. In this embodiment, the specific implementation is as follows: Two related rules were retrieved from the change rule base for the composite index. Rule A was triggered by the condition "the changed field contains the material code and the accuracy level of the substitute material is improved", and the action instruction was "start the three-level approval workflow". Rule B was triggered by the condition "the purchase price of the changed material is more than 10% higher than the original material's unit price", and the action instruction was "add financial node approval". In this change, the original resistor accuracy was 5% and the new resistor accuracy was 1%, which met the condition of Rule A. However, the price difference did not reach 10%, so it did not meet the condition of Rule B. Therefore, only Rule A was marked as a match. In step S4, the approval workflow triggers a judgment, which is specifically implemented as follows in this embodiment: Condition evaluation is performed on rule A, including field-level conditions. =1, the current value of the precision field is 1%, which meets the precision enhancement condition range defined in the rule; time window condition. =1, current system timestamp =14:30 falls within the valid time window [00:00, 23:59] defined by the rule; Role conditions =1, the current user role set is R&D engineer, which intersects with the R&D engineer role set specified by the rule; the three-condition logical AND is true, rule A is triggered; extract the approval flow identifier ECN_MATERIAL_REPLACE_3LEVEL from the action instruction of rule A, call the approval flow engine to generate an approval task instance, and define the duration in the rule. =2 hours, safety factor S=1.3, calculate =3 hours; the approval sequence is: R&D supervisor approval, engineering department verification, and production plan confirmation; In step S5, the comparison and difference extraction of changed content are specifically implemented as follows in this embodiment: Data records before the change are extracted from the historical record table of the MES system database using the key value R1206_10K. With an accuracy of 5% and a unit price of 0.012 yuan, extract the changed data records from the current table. Its accuracy is 1%, and the unit price is 0.018 yuan. After comparing each field, three difference fields are marked: the material code changes from R1206_10K to R1206_10K_1%, which is a text replacement type; the accuracy level changes from 5% to 1%, which is a numerical decrease type; and the unit price changes from 0.012 yuan to 0.018 yuan, which is a numerical increase type. After sorting by field name, a change difference vector is generated. =[<Material Code, R1206_10K, R1206_10K_1%, text_replace>, <Precision Class, 5%, 1%, num_decrease>, <Unit Price, 0.012, 0.018, num_increase>] T ; In step S6, the calculation of the scope of influence is specifically implemented as follows in this embodiment: taking material R1206_10K as the starting node. In the electronic bill of materials structure tree Traverse upwards to find the parent node "Power Management Module PCB Board", and the path distance is... =1, traverse downwards to find the child node "Surface Mount Resistor Station", path distance =1; in the electronic assembly process roadmap The search query identifies the placement process with this material as "SMT placement process". This process is also associated with other electronic material nodes such as capacitors and inductors. These material nodes are then added to the associated influence set. Process-dependent distance =1; Calculate the overall impact weight: For the parent node PCB board, W=1 / (0.6×1+0.4×0+0.1)=1 / 0.7≈1.4286; For the child node surface mount resistor station, W=1 / (0.6×1+0.4×1+0.1)=1 / 1.1≈0.9091; For the associated material capacitor, W=1 / (0.6×0+0.4×1+0.1)=1 / 0.5=2; After L2 norm normalization, we get The values are 0.545, 0.347, and 0.763 respectively; the final set of associated effects. This includes PCB production orders, chip resistor station program parameters, and procurement plans for related capacitors; In step S7, associated tasks are automatically generated. In this embodiment, the specific implementation is as follows: a production plan adjustment task is created for the PCB board production order, with an execution priority of P=0.545×2=1.09, where urgency level 2 corresponds to a critical process; a program parameter update task is created for the chip resistor station, with P=0.347×1=0.347; a purchase order update task is created for the associated capacitor, with P=0.763×1=0.763; the operation recommendation library outputs operation guidance text "It is recommended to simultaneously check the temperature characteristics of the capacitor and the circuit matching after the resistor accuracy improvement, and replace it with a capacitor of the same level if necessary" based on the accuracy improvement features in the difference vector and the capacitor matching features in the association set; the three tasks are encapsulated in JSON data format and then the to-do task interface of the MES system is called to push them to the to-do task lists of the process engineer and the production planner, respectively.
[0022] Example 3: Sales order confirmation triggers production plan generation scenario A method for triggering information changes in an MES system includes the following steps: In step S1, the change event capture is specifically implemented as follows in this embodiment: When the status field of order number SO10086 in the sales order table `sale_order` changes from "pending confirmation" to "effective", the change listener hook captures the update operation, extracts the operation type as modification identifier, the change source data table identifier as `sale_order`, and the key value of the change record as SO10086, and encapsulates the change event object E= <modify,sale_order,SO10086, The event was sent to the asynchronous processing queue. The waiting time was 150ms, and the event was processed normally. In step S2, the change type is categorized, which is specifically implemented as follows in this embodiment: The change source data table identifier `sale_order` is parsed, and the main type is matched as a sales order change type in the change type mapping table; further, the field names of the changed fields in the change record are read, and it is found that the changed field is a status field with a new value of "effective". Therefore, the subtype of this change is determined to be a sales order effective change, and the result is output. =(SALE_ORDER,ORDER_ACTIVE); In step S3, the matching rules are changed. In this embodiment, the specific implementation is as follows: To index the associated rules retrieved from the change rule base, the trigger condition is "status field changed to effective and order type is domestic sales order", and the action instruction is "automatically generate production plan"; the order type field value of order SO10086 is domestic sales order, which meets the condition; In step S4, the approval flow triggers a judgment, which is specifically implemented as follows in this embodiment: The rule is evaluated based on conditions at the field level. =1, the new value "effective" in the status field falls within the condition value range; time window condition =1, the current time falls within the valid window of the entire day defined by the rule; role conditions =1, the current user role is a sales specialist, which overlaps with the role set specified by the rule; the three-condition logical AND is true, the rule is triggered; extract the approval flow identifier AUTO_PLAN_NO_APPROVAL from the action instruction, this identifier indicates that it is triggered directly without manual approval, call the approval flow engine to generate an empty approval task instance. =0, the approval task instance passes directly; In step S5, the comparison and difference extraction of changed content are specifically implemented as follows in this embodiment: the data record before the change is extracted using the key value SO10086. Its status is pending confirmation; data records after modification. Its status is "effective". After comparing each field, the status of the difference fields changes from "pending confirmation" to "effective". This is a text replacement type, and a change difference vector is generated. =[<status, pending confirmation, effective, text_replace>] T ; In step S6, the calculation of the scope of influence is specifically implemented as follows in this embodiment: Taking sales order SO10086 as the starting node, find the corresponding product material code P001, i.e., the intelligent central control host, and use P001 as the root node in the electronic bill of materials structure tree. The process iterates downwards through all levels of sub-materials, including PCB boards, resistors, capacitors, casings, wires, and a total of 87 electronic material nodes. Each node... path distance The numbers range from 1 to 5; in the electronic assembly process roadmap Find the dependencies in the main assembly process and add all the materials required by each process to the set of related influences. When calculating the overall impact weight of each node, the path distance is considered. Larger nodes have lower weights. For example, a resistor at depth 5 has a weight W = 1 / (0.6×5+0+0.1) = 1 / 3.1 ≈ 0.3226, which is normalized to... Approximately 0.02; final It includes procurement plan records and production material input records for all 87 materials; In step S7, associated tasks are automatically generated. In this embodiment, this is implemented as follows: The task generator creates a corresponding procurement plan task or production material input task for each material. For a certain type of capacitor, its current inventory is 2000 units, and the order demand is 5000 units. Based on the "effective" tag in the difference vector and the "inventory shortage" feature in the associated impact set, the system matches the recommended operation guidance text "This material has an inventory shortage of 3000 units; it is recommended to generate an emergency purchase requisition form"; execution priority... according to Calculations, including those for IC chips with long lead times. =0.15 and urgency level =3, P=0.45 is the highest; all 87 tasks are encapsulated in JSON format and inserted into the to-do list of the purchasing agent and production planner in descending order of priority, and the front end is triggered to notify in real time.
[0023] Example 4: Scenario of Material Usage Adjustment and Change A method for triggering information changes in an MES system includes the following steps: In step S1, the change event capture is specifically implemented as follows in this embodiment: When the usage field of the sub-material capacitor C001 of product P002 in the electronic bill of materials table bom_item is changed from the value 2 to the value 3, the change listening hook intercepts the UPDATE operation, extracts the operation type as modification identifier, the change source data table identifier as bom_item, and the key value of the change record as C001, and sends the encapsulated change event object to the asynchronous processing queue. The waiting time is 180ms, and the event is processed normally. In step S2, the change type is classified, which is specifically implemented as follows in this embodiment: The change source data table identifier `bom_item` is parsed, and the main type is matched as an electronic bill of materials change type in the change type mapping table; further, the field names of the changed fields in the change record are read, and it is found that the changed field is a usage field. Therefore, the subtype of this change is determined to be an electronic material usage adjustment change, and the result is output. =(BOM_CHANGE,USAGE_ADJUST); In step S3, the matching rules are changed. In this embodiment, the specific implementation is as follows: To index the associated rules retrieved from the change rule base, the trigger condition is "usage increase ratio exceeds 20%", and the action instruction is "start the secondary approval process and trigger inventory reservation change"; this time the usage increased from 2 to 3, an increase ratio of 50%, which meets the condition; In step S4, the approval flow triggers a judgment, which is specifically implemented as follows in this embodiment: The rule is evaluated based on conditions at the field level. =1, the usage increase rate of 50% is greater than the threshold of 20%; time window condition. =1, the rule's effective time window is the entire day, and the current time falls within that window; Role conditions =1, the current user role is Materials Engineer, which intersects with the role set specified by the rule; the three-condition logical AND is true, the rule is triggered; extract the approval flow identifier USAGE_CHANGE_2LEVEL from the action instruction, call the approval flow engine to generate an approval task instance, and define the duration in the rule. =1 hour, safety factor S=1.3, calculate =2 hours; the approval sequence is: project supervisor approval and cost accountant approval; In step S5, the comparison and difference extraction of changed content are specifically implemented as follows in this embodiment: the data record before the change is extracted using the key value C001. Its usage is 2, and the data record after the change. Its usage is 3. After field-by-field comparison, the usage of the marked difference fields changes from 2 to 3, which is a numerical increase type, and a change difference vector is generated. =[<dosage, 2, 3, num_increase>] T ; In step S6, the calculation of the associated influence range is specifically implemented as follows in this embodiment: taking material capacitor C001 as the starting node. In the electronic bill of materials structure tree Traverse upwards to find the parent node P002, and calculate the path distance. =1, then find the parent node of P002, the final product, and the path distance. =2; Traversing downwards, no child nodes are found; In the electronic assembly process roadmap The process that uses capacitor C001 is identified as the "insertion process," which is also associated with all other insert materials for this product, such as resistors and diodes. All outstanding production orders for P002, the material station list for the insertion process, the cost accounting sheet, and related electronic material nodes are added to the associated impact set. After calculating the influence weights of each node, normalize them. For example, the influence weight of parent node P002... =0.45, material station table for plug-in process =0.35, cost accounting sheet =0.20; In step S7, associated tasks are automatically generated. In this embodiment, the specific implementation is as follows: a "Material Usage Correction" task is created for each unfinished production order, with execution priority set. The urgency of delivery for production order WO2345 is mapped to... =2, its =0.45, P=0.9; The task details include the current status of the affected record "Production order WO2345 has received materials but has not started the plugin", and the recommended operation guide text is "The capacitor usage has been adjusted from 2 to 3, it is recommended to reissue the difference of 1 capacitor per unit, a total of 50 units of orders need to be reissued, totaling 50 capacitors"; After the task is packaged in JSON format, it is pushed to the to-do task list of the production material handler and the warehouse manager.
Claims
1. A method for triggering information changes in a MES system, characterized in that, Includes the following steps: S1. Change Event Capture: Real-time monitoring of the database operation logs of at least one business module in the MES system. When a new or modified operation is detected in any data record of at least one preset monitoring data table, the change information of the data record is encapsulated into a change event object. S2. Change type classification: Read the change source data table identifier in the change event object, match it with the preset change type mapping table, and determine the change type to which the change event belongs; S3. Change rule matching: Based on the change type determined in step S2, at least one change rule associated with the change type is retrieved from the preset change rule library. Each change rule contains a trigger condition expression and at least one action instruction. The trigger condition expression contains at least the field-level conditions of the change record, the time window conditions, and the user role conditions. S4. Approval flow trigger determination: For each matched change rule, its trigger condition expression is decomposed into three sub-items: field-level condition, time window condition, and user role condition, and a comprehensive determination is made. If and only if all three sub-items are satisfied, the approval flow engine of the MES system is called to generate a change approval task instance according to the preset approval flow identifier in the rule. S5. Change content comparison and difference extraction: When the change approval task instance enters the approval node, the data records before and after the change are extracted from the MES system database using the key value of the change record in the change event object as the index. The data is compared field by field to generate a change difference vector to represent the difference information of the changed fields. S6. Calculation of the scope of related impact: Based on the change difference vector generated in step S5, and combined with the electronic bill of materials structure tree and electronic assembly process route map pre-generated in the MES system, a recursive traversal process is executed. The specific steps are as follows: S61. Starting Node Location: The electronic material code corresponding to the change source record shall be used as the starting node. When the change source record pertains to an order change, the starting node further includes the order number in the electronic bill of materials (OBM) structure tree. Locate the node in the middle; S62. Upward recursive traversal: from Traverse upwards to the root node and record the set of all parent nodes. and each node arrive path distance The path distance is calculated based on the electronic bill of materials hierarchy difference; S63. Downward recursive traversal: from Traverse downwards to all leaf nodes and record the set of all child nodes. and each node arrive path distance The path distance is calculated based on the electronic bill of materials hierarchy difference; S64. Process Dependency Extension: For Each node in In the electronic assembly process roadmap Search in For the mounting process p that corresponds to an input or output electronic material, other electronic material nodes associated with this process are added to the associated influence set. Simultaneously record the distance of process dependencies. This distance is calculated by summing the edge weights of adjacent processes in the process route diagram, with a default edge weight of 1. S65. Weight Calculation: For the set of related influences Each affected record in Define its overall impact weight as follows: ,in and These are the weighting coefficients. =0.6, =0.4, =0.1 is the smoothing factor; then for All nodes L2 norm normalization is performed to obtain the final influence weight values. ; S7. Automatic generation of associated tasks: Based on the associated impact set generated in step S6, automatically create a corresponding transaction execution task for each affected data table record identifier in the set, and push the transaction execution task to the to-do list of the corresponding role user.
2. The information change triggering method for an MES system as described in claim 1, characterized in that, In step S1, the specific steps are as follows; S11. Listener hook configuration: Embed change listener hooks in the database operation layer of each business module of the MES system. These change listener hooks intercept operation requests before the data record insertion or update operation is executed, and extract the operation type and primary key information of the data record. S12. Monitoring table comparison: Compare the intercepted operation request information with the preset monitoring data table list. If the data table targeted by the operation request is in the monitoring data table list, then execute step S13; otherwise, allow the operation request and terminate the subsequent triggering process. S13. Change Information Extraction: Extract the change type identifier, change source data table identifier, and key value of the change record from the operation request. The change type identifier includes the addition identifier and the modification identifier. The modification identifier is further subdivided into single-field modification identifier and multi-field modification identifier. S14. Object encapsulation: Obtain the current system time as the change timestamp, and encapsulate the information extracted in step S13 together with the change timestamp into a change event object; S15. Asynchronous Enqueue: The encapsulated change event object is added to the asynchronous processing queue. If the waiting time in the asynchronous processing queue exceeds a preset packet loss threshold, the change event object is discarded. This packet loss threshold is represented by a variable. This indicates that the unit is milliseconds (ms), and its value range is 5000 < ms. <30000.
3. The information change triggering method for a MES system as described in claim 1, characterized in that, In step S2, the specific steps are as follows; S21. Table Identifier Parsing: Parse the source data table identifier in the change event object, and extract the business module category and table function tag to which the data table belongs; S22. Mapping table matching: Perform a hash lookup in the preset change type mapping table using the change source data table identifier as the key value. The change type mapping table stores a set of key-value pairs from the data table identifier to the change type code. S23. Fine-grained type determination: If the matched change type is an electronic bill of materials change type, then further read the field name of the changed field in the change record, and determine whether it is an electronic component replacement change, electronic material usage adjustment change or material tag number update change according to the change subdivision rule corresponding to the field name; S24. Type Result Output: Outputs a modified type-encoded object. ,in Primary type identifier, For subtype identification, when there is no sub-type It is an empty value.
4. The information change triggering method for a MES system as described in claim 1, characterized in that, In step S3, the specific steps are as follows; S31. Rule base retrieval: Using the change type code determined in step S2 as the retrieval index, read the list of all associated rule identifiers from the change rule base, which is stored using an inverted index structure; S32. Rule Instantiation: For each rule identifier in the rule identifier list, load its rule definition body from the rule base. The rule definition body contains an abstract syntax tree of the triggering condition expression and a sequence of action instructions. S33. Condition Pre-check: Quickly validate the field-level conditions in the triggering condition expression, extract the current value of the corresponding field in the current change event object, and determine whether it meets the value range or enumeration value constraint in the field-level condition. If it does not meet the constraint, skip the rule. S34. Rule Output: Output all rules that have passed the pre-check in step S33, along with their instantiated trigger condition expressions and action instruction sequences.
5. The information change triggering method for a MES system as described in claim 1, characterized in that, In step S4, the specific steps are as follows; S41. Field-level condition evaluation: For field-level conditions in change rules, verify whether the current value of the corresponding field in the change record falls within the condition value range defined for that field-level condition. Define the field-level condition evaluation function as follows: ,in This is the current value of the k-th condition field. This is the conditional value range for this field. This is an indicator function that, when all condition fields are satisfied... =1 otherwise 0; S42. Time Window Condition Evaluation: Get the current system timestamp Determine whether it falls within the valid time window defined by the change rule. , Within [the specified area], the time window condition evaluation function is defined as follows: If the condition is met, then 1 is taken; otherwise, 0 is taken. S43. Role Condition Evaluation: Retrieves the set of role identifiers for the currently operating user. The set of roles specified by the definition rule is The function for evaluating the character conditions is: If there is an intersection, take 1; otherwise, take 0. S44. Approval workflow identifier acquisition: If If =1, then extract the approval flow identifier field value from the action instruction sequence of the change rule; S45. Task Instance Generation: Call the MES system's approval flow engine interface, passing in the approval flow identifier and the key-value pair of the change event object. The engine generates a change approval task instance based on the predefined approval process template. The approval time limit parameter of this instance... Duration is defined by rules in the template. Multiply by the safety factor S and round up to get the result. The safety factor S has a value range of 1.2 < S < 1.
5. The unit is hours.
6. The information change triggering method for a MES system as described in claim 1, characterized in that, In step S5, the specific steps are as follows; S51. Historical Record Extraction: Using the key value of the change record in the change event object as an index, retrieve the most recent commit record corresponding to that key value from the historical record table of the MES system database as the data record before the change. Use the latest record in the current database as the updated data record. ; S52. Field-level traversal: [This refers to...] and Iterate through all fields in the array, and for each field j, compare... and Are they equal? S53. Difference label: If If so, mark the field as a difference field and record the field name. Value before the change Value after change And generate a change type label for the difference field based on the semantic rules of the field name. The change type label is used to indicate the semantic category of the field change, including at least one of numerical increase, numerical decrease, text replacement, and association key change. S54. Vector Construction: Sort all records corresponding to the difference fields by field name and concatenate them into a change difference vector. Each component , where m is the total number of difference fields.
7. The information change triggering method for a MES system as described in claim 1, characterized in that, In step S7, the specific steps are as follows; S71. Task Type Determination: Based on the data table type to which the affected record in the associated impact set belongs, the task type identifier of the task is set to one of the following: production plan adjustment type, purchase order update type, or inventory reservation change type. S72. Priority Calculation: Based on the impact weight value of the affected record. And the urgency level of the mounting process corresponding to the affected record in the electronic assembly process roadmap. Calculate the execution priority value Among them, the urgency level The value range is from 1 to 3, corresponding to ordinary processes, key processes, and bottleneck processes, respectively; S73. Recommended Operation Matching: Change the Difference Vector With the set of related effects The joint features are input into a preset operation recommendation library, which uses a decision tree model and outputs the operation guidance text Guide that has the highest matching degree with the joint features. S74. Task Push: After encapsulating the transaction execution task in JSON data format, call the MES system's to-do task interface to insert the task into the to-do task list database of the corresponding role user, and trigger a real-time notification on the front-end interface.
Citation Information
Patent Citations
Examination data auditing method and system based on knowledge graph
CN122266598A
Optimized regression testing through dependency graph analysis and selective test execution
US20260072811A1
