Data processing method and device, MES system, storage medium and equipment
By introducing local and cloud servers into the MES system and dynamically adjusting the processing path according to the real-time requirements of events, the network latency problem under the centralized cloud architecture is solved, and the efficient response of the MES system and the fulfillment of business needs are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-04-03
AI Technical Summary
The existing MES system adopts a centralized cloud architecture, which makes it difficult to meet the business requirements for real-time response due to network latency, especially in scenarios such as field equipment data acquisition, status monitoring and quality inspection, where it cannot meet the requirements for millisecond-level response.
By introducing local and cloud servers into the MES system, event types are generated based on the real-time requirements of production-related data, and processing paths are determined based on the event types. Events with high real-time requirements are routed to the local server for processing, while events with low real-time requirements are routed to the cloud server for processing. The routing strategy is dynamically adjusted in combination with network status and server load to achieve efficient event processing.
It reduces network latency for events with high real-time requirements, improves the response speed of the MES system, meets business needs, and ensures system continuity and availability when the network is unstable.
Smart Images

Figure CN121785809A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, specifically to a data processing method, apparatus, MES system, storage medium, and equipment. Background Technology
[0002] Manufacturing Execution System (MES) is a production management system oriented towards the shop floor level, used to monitor, schedule, and trace the production process in real time.
[0003] Currently, MES systems primarily adopt a centralized cloud architecture. Specifically, all data processing and business logic within the factory are centralized on a cloud server. All equipment data must be uploaded to the cloud server via the network for processing, and the processing results from the cloud server are then used to control factory manufacturing.
[0004] However, in practical applications, the MES system with the above architecture suffers from significant network latency, making it difficult to meet the business requirements for real-time response. Summary of the Invention
[0005] The problem this invention aims to solve is: how to improve the response speed of a MES system.
[0006] To address the above problems, embodiments of the present invention provide a data processing method applied to a MES system, wherein the MES system includes a local server and a cloud server; the method includes: Collect production-related data; Events are generated based on production-related data; The type of the generated event is determined based on the real-time requirements of production-related data; The processing path of the event is determined based on the type of the event, and the event is routed to the corresponding server for processing according to the determined processing path.
[0007] In one possible embodiment, the type of the event includes: Real-time events; Business events; And statistical events; The real-time requirement for the real-time event is greater than that for the business event, and the real-time requirement for the business event is greater than that for the statistical event.
[0008] In one possible embodiment, determining the processing path of the event based on its type includes: Determine the current network status; When the current network is disconnected, the event is routed to the local server for processing; When the current network is in a non-disconnected state, the processing path of the event is determined based on the type of the event.
[0009] In one possible embodiment, when the current network is in a non-disconnected state, determining the processing path of the event based on the type of the event includes: When the business rule corresponding to the event indicates the server to process the event, the event is routed to the indicated server for processing; When the business rule corresponding to the event does not indicate the server to process the event, the processing path of the event is determined according to the type of the event.
[0010] In one possible embodiment, determining the processing path of the event based on the type of the event includes: When the type of the event is a statistical event, the event is routed to a cloud server for processing; When the type of the event is a business event, the processing path of the event is determined based on the current load of the local server and the cloud server. When the event is a real-time event, the processing scores of the local server and the cloud server are calculated, and the processing path of the event is determined based on the score results.
[0011] In one possible embodiment, the processing path for the event is determined based on the current load of the local server and the cloud server, including: Based on the load conditions of the local server and the cloud server, calculate the load utilization rate of each of the local server and the cloud server; The event processing path is determined based on the load utilization of the local server and the cloud server.
[0012] In one possible embodiment, determining the event processing path based on the respective load utilization rates of the local server and the cloud server includes: When the load utilization of the local server is greater than the first load utilization threshold and the load score of the cloud server is less than the second load utilization threshold, the event is routed to the cloud server for processing. When the load score of the cloud server is greater than the first load utilization threshold and the load score of the local server is less than the second load utilization threshold, the event is routed to the local server for processing. The first load utilization threshold is greater than the second load utilization threshold.
[0013] In one possible embodiment, the processing scores of the local server and the cloud server are calculated, and the processing path of the event is determined based on the score results, including: Based on the current network status, the type of the event, the load situation, and the corresponding business rules, calculate the processing scores of the local server and the cloud server respectively. Compare the processing scores of the local server with the processing scores of the cloud server; The processing path for the event is determined based on the comparison results.
[0014] In one possible embodiment, the MES system further includes: a cloud database connected to a cloud server, and a local database connected to a local server; the method further includes: Capture and synchronize data changes in the cloud database and local database.
[0015] In one possible embodiment, the method further includes: A consistency comparison is performed between the data in the cloud database and the local database; When there is inconsistency between the data in the cloud database and the local database, the inconsistent data is resolved according to a preset conflict strategy, and the resolved data is synchronously updated to the cloud database and the local database.
[0016] In one possible embodiment, resolving inconsistent data according to a preset conflict strategy includes: Overwrite the inconsistent data with timestamp-prioritized data; When the inconsistent data timestamps are the same, the data priority is determined according to business rules, and the data with higher priority overwrites the inconsistent data.
[0017] This invention also provides a data processing apparatus for use in a MES system, the MES system including a local server and a cloud server; the apparatus includes: The data acquisition unit is suitable for collecting production-related data. The event generation unit is suitable for generating corresponding events based on production-related data. A type determination unit is adapted to determine the type of the generated event, wherein the type of the event is determined based on the real-time requirements of production-related data; The path decision unit is adapted to determine the processing path of the event based on the type of the event, and to route the event to the corresponding server for processing according to the determined processing path.
[0018] In one possible embodiment, the device further includes: The data synchronization unit is adapted to capture and synchronize data changes in the cloud database and the local database.
[0019] In one possible embodiment, the data synchronization unit is further adapted to perform a consistency comparison of the data in the cloud database and the local database; when there is inconsistency between the data in the cloud database and the local database, the inconsistent data is resolved according to a preset conflict strategy, and the resolved data is synchronized and updated to the cloud database and the local database.
[0020] This invention also provides a MES system, the system comprising: Local server; Cloud server; and any of the above-mentioned data processing devices; The data processing device is connected to the local server and the cloud server respectively, and is adapted to collect production-related data and generate corresponding events. Based on the type of the generated event, the processing path of the event is determined, so as to route the event to the corresponding server for processing according to the determined processing path.
[0021] In one possible embodiment, the data processing device is integrated into the local server.
[0022] In one possible embodiment, the number of local servers is two or more, and each corresponds to a manufacturing plant.
[0023] In one possible embodiment, the number of data processing devices is two or more, and each device corresponds to a local server.
[0024] Compared with the prior art, the technical solution of the embodiments of the present invention has the following advantages: By applying the solution of this invention, after collecting production-related data, corresponding events are first generated based on the production-related data, and then the type of the generated event is determined. This allows for the determination of the event's processing path based on the event type. Since the event type is determined according to the real-time requirements of the production-related data, when determining the event processing path based on the event type, events can be routed to corresponding servers for processing based on the real-time requirements of the production-related data. For example, events with high real-time requirements can be routed to local servers, while events with low real-time requirements can be routed to cloud servers. This reduces network latency for events with high real-time requirements, improves the response speed of the MES system, and better meets business needs. Attached Figure Description
[0025] Figure 1 This is a flowchart of a data processing method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating how to determine an event processing path in an embodiment of the present invention; Figure 3 This is a flowchart of a data synchronization method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of the MES system in an embodiment of the present invention. Detailed Implementation
[0026] Currently, MES systems primarily adopt a centralized cloud architecture. Specifically, all data processing and business logic within the factory are centralized on a cloud server. All equipment data must be uploaded to the cloud server via the network for processing, and the processing results from the cloud server are then used to control factory manufacturing.
[0027] In practical applications, the above-mentioned MES system will have significant network latency in scenarios with strict real-time requirements such as field equipment data acquisition, status monitoring, and quality inspection, and will not be able to meet the business requirements of millisecond-level response.
[0028] To address this problem, the present invention provides a data processing method. This method can determine the processing path of an event by combining the type of the event, that is, the real-time requirements of the event are taken into account when determining the event processing path, thereby better meeting business needs.
[0029] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0030] Reference Figure 1 This invention provides a data processing method applied to a MES system, which includes a local server and a cloud server; the method may include the following steps: Step 11: Collect production-related data.
[0031] In practice, production-related data can be collected through direct physical connections with production equipment, sensors, controllers, and other devices within the manufacturing plant. This production-related data can include all data related to production, such as equipment status data, product quality data, production status data, material data, business rule data, and load usage data from local and cloud servers.
[0032] Step 12: Generate corresponding events based on production-related data.
[0033] In practice, the collected data can be preprocessed, including filtering and format conversion. The preprocessed data can then be quantified, and threshold, logical, and trend assessments performed based on preset event rules. When the data meets the event triggering conditions, a standardized production event is automatically generated, containing the event type, time, location, and associated objects.
[0034] For example, if the preprocessed data is "output reaches 100", a "work order completion event" can be generated; if the preprocessed data is "equipment downtime > 5 minutes", an "equipment abnormality event" can be generated.
[0035] Step 13: Determine the type of the generated event, which is determined based on the real-time requirements of production-related data.
[0036] In some embodiments, the type of the event may include: Real-time events; Business events; And statistical events; The real-time requirement for the real-time event is greater than that for the business event, and the real-time requirement for the business event is greater than that for the statistical event.
[0037] Specifically, real-time events have the highest real-time requirements, with a network latency tolerance typically less than 100ms. Examples include events representing equipment failures, quality anomalies, and production anomalies. Business events have medium real-time requirements, with a network latency tolerance typically less than 1 second. Examples include events representing work order issuance, material consumption, production reporting, and quality assessment. Statistical events have the lowest real-time requirements and a high network latency tolerance. Examples include events representing hourly / shift / day production statistics and Overall Equipment Effectiveness (OEE) statistics.
[0038] Step 14: Determine the processing path of the event based on the type of the event, and route the event to the corresponding server for processing according to the determined processing path.
[0039] In practice, events with high real-time requirements can be routed to local servers for processing, while events with lower real-time requirements can be routed to cloud servers. This reduces network latency for events with high real-time requirements, improves the response speed of the MES system, and better meets business needs. For example, real-time events can be routed to local servers for processing, while statistical events can be routed to cloud servers for processing.
[0040] Reference Figure 2 This invention also provides a method for determining an event processing path, the method including the following steps: Step 201: Determine the current network status.
[0041] In practical applications, due to the complex network environment in manufacturing plants, there are problems such as network instability and bandwidth limitations. Cloud servers cannot work properly when the network is interrupted, which seriously affects production continuity and system availability.
[0042] Therefore, in one embodiment of the present invention, during the process of determining the event processing path, the current network status is first determined, that is, the network status of the local server and the cloud server. This allows it to be determined whether the local server and the cloud server are connected normally, so that when the network status changes, the time processing path can be automatically adjusted to reduce the impact on production and the system.
[0043] Step 202: Determine if the current network is disconnected.
[0044] If the current network is disconnected, proceed to step 203. If the current network is connected, determine the processing path for the event based on its type.
[0045] Step 203: Route the event to the local server for processing.
[0046] In other words, when the connection between the local server and the cloud server is lost, the event is routed to the local server for processing. This allows the local server to respond to the event quickly, thereby avoiding production interruptions and ensuring the system's response speed.
[0047] When the network is currently in a non-disconnected state, various methods can be used to determine the processing path of the event, depending on the type of the event. In one embodiment of the present invention, step 204 can be executed first, that is, first determine whether the business rule corresponding to the event indicates a server to process the event, and then determine the server to process the event based on the judgment structure.
[0048] Step 204: Determine whether the business rule corresponding to the event indicates the server that will process the event.
[0049] In determining the processing path of an event based on its type, in addition to network status, business rules are read first, and the server to process the event is determined based on the business rules, thereby ensuring that the event routing meets the business rules.
[0050] In practice, when the event involves sensitive data, the business rules typically specify the local server to handle the event to minimize the leakage of sensitive data. When the event requires cross-factory collaboration, the business rules typically specify the cloud server to handle the event. In other cases, the business rules may not specify a server to handle the event. When the business rules explicitly specify a server to handle the event, proceed to step 205; otherwise, determine the processing path for the event based on its type.
[0051] Step 205: The event is routed to the designated server for processing.
[0052] In other words, when the business rule corresponding to an event indicates the server to process the event, the event is routed to the indicated server for processing, so that the routing of the event can satisfy the business rule.
[0053] In one embodiment, when determining the processing path of the event based on the type of the event, steps 206 to 208 may be executed.
[0054] Step 206: When the type of the event is a statistical event, the event is routed to the cloud server for processing.
[0055] Since the real-time requirements for statistical events are relatively low, in one embodiment of the present invention, statistical events can be forcibly routed to a cloud server for processing to reduce the occupation of local servers.
[0056] Step 207: When the type of the event is a business event, determine the processing path of the event based on the current load of the local server and the cloud server.
[0057] In practice, when determining the processing path of the event based on the current load of the local server and the cloud server, the load utilization of the local server and the cloud server can be calculated first, and then the processing path of the event can be determined based on the load utilization of the local server and the cloud server, so that the load of the local server and the cloud server is as balanced as possible.
[0058] Specifically, when the load utilization of the local server is greater than a first load utilization threshold and the load score of the cloud server is less than a second load utilization threshold, the event is routed to the cloud server for processing. When the load score of the cloud server is greater than the first load utilization threshold and the load score of the local server is less than the second load utilization threshold, the event is routed to the local server for processing.
[0059] When the load utilization of the local server is less than or equal to the first load utilization threshold and greater than or equal to the second load utilization threshold, or when the load utilization of the cloud server is less than or equal to the first load utilization threshold and greater than or equal to the second load utilization threshold, the event is routed to the local server or the cloud server for processing.
[0060] In practice, the first load utilization threshold is greater than the second load utilization threshold, and the specific value can be set according to the actual situation. For example, the first load utilization threshold can be set to 80%, and the second load utilization threshold to 50%. In this case, when the load utilization of the local server is greater than 80% and the load utilization of the cloud server is less than 50%, the business event is routed to the cloud server for processing. When the load utilization of the cloud server is greater than 80% and the load utilization of the local server is less than 50%, the business event is routed to the local server for processing. This can help to balance the load between the local server and the cloud server as much as possible.
[0061] Step 208: When the type of the event is a real-time event, calculate the processing scores of the local server and the cloud server respectively, and determine the processing path of the event based on the score results.
[0062] In practice, the processing scores of the local server and the cloud server can be calculated based on the current network status, the type of the event, the load, and the corresponding business rules. The processing scores of the local server and the cloud server are then compared, and the processing path of the event is determined based on the comparison results.
[0063] In one embodiment, the network status score, event type score, load score, and business rule score of the local server and the cloud server can be calculated separately, and the scores of the same server can be weighted and summed to obtain the final processing score of the server.
[0064] Specifically, when calculating the local server's network status score (NetworkEdgeScore), network latency data (Latency), bandwidth usage data (BandwidthUsage), packet loss rate data (PacketLoss), and network availability data (Availability) can be obtained. These data are then substituted into a preset network status factor evaluation function to obtain the network status factor value (NetworkScore), and finally, the NetworkEdgeScore is derived from the NetworkScore. The worse the network condition, the higher the NetworkEdgeScore.
[0065] Where NetworkScore = f(Latency, BandwidthUsage, PacketLoss, Availability), the value range is [0, 1]. NetworkEdgeScore = 1 - NetworkScore. When the network is disconnected, NetworkEdgeScore can be set to 1.0, which forces the local server to handle the operation.
[0066] In practical implementation, when calculating the EventEdgeScore for the local server, you can set EventEdgeScore to 1.0 for real-time events, meaning real-time events are processed primarily on the local server. For statistical events, set EventEdgeScore to 0.0, meaning statistical events are processed primarily on the cloud server. For business events, set EventEdgeScore to any value within the range (0, 1), for example, set EventEdgeScore to 0.5.
[0067] In practical implementation, when calculating the load score (LoadEdgeScore) of the local server, load data of the local server can be obtained, including CPU utilization, memory utilization, queue length, etc., to obtain the comprehensive load score (EdgeLoadScore) of the local server. The value of EdgeLoadScore ranges from [0, 1]. Let LoadEdgeScore = 1 – EdgeLoadScore. This ensures that the lower the comprehensive load score of the local server, the higher the load score (LoadEdgeScore), and thus the higher the priority for processing by the local server.
[0068] In practical implementation, when calculating the business rule score (RuleEdgeScore) for the local server, the score can be set to 1.0 when the business rule instructs the local server to process the rule, and to 0.0 when the business rule instructs the cloud server to process the rule. When there is no business rule instruction, the score is set to 0.5.
[0069] Accordingly, the local server's processing score, EdgeScore, can be represented as: EdgeScore = W_event×EventEdgeScore+W_network×NetworkEdgeScore+W_load×LoadEdgeScore+W_rule×RuleEdgeScore.
[0070] Wherein, W_event represents the weight of the event type score, W_network represents the weight of the network status score, W_load represents the weight of the load score, and W_rule represents the weight of the business rule score.
[0071] Similarly, when calculating the network status score (NetworkCloudScore) for a cloud server, you can set NetworkCloudScore = NetworkScore. In this case, the better the network status, the higher the NetworkCloudScore value. When NetworkCloudScore = 0, it indicates that the network connection is broken.
[0072] When calculating the EventCloudScore for cloud server events, you can set EventCloudScore = 0.0 for real-time events, indicating that real-time events are not suitable for processing on the cloud server. For statistical events, set EventEdgeScore = 1.0, meaning statistical events are preferentially processed on the cloud server. For business events, set EventEdgeScore to any value within the range (0, 1), for example, setting EventEdgeScore = 0.5, where EventEdgeScore + EventEdgeScore = 1.
[0073] When calculating the load score (LoadCloudScore) of a cloud server, load data of the cloud server can be obtained, including CPU utilization, memory utilization, queue length, etc., to obtain the overall load score (CloudLoadScore). The CloudLoadScore value ranges from [0, 1]. Let LoadCloudScore = 1 - CloudLoadScore. This means that the lower the overall load score of the cloud server, the higher its LoadEdgeScore, and the more preferentially it will be processed by the cloud server.
[0074] In practical implementation, when calculating the business rule score (RuleCloudScore) for the cloud server, RuleCloudScore can be set to 1.0 when the business rule instructs the cloud server to process the request, and to 0.0 when the business rule instructs the local server to process the request. When there is no business rule instruction, RuleEdgeScore is set to 0.5.
[0075] In practice, the weights of the cloud server's network status score, event type score, load score, and business rule score can be pre-set. The value of each weight can be adjusted according to the degree of influence of each score on the final processing path, and the sum of all weights is 1. For example, the weight of the network status score can be set to W_network=0.3, and the weight of the load score can be set to W_load=0.2.
[0076] When setting the weights for event type scores, different weights can be set based on different event types. The weight of real-time events is greater than that of business events, and the weight of business events is greater than that of statistical events. For example, the weight of real-time events can be set to W_event=0.4, the weight of business events to W_event=0.3, and the weight of statistical events to W_event=0.1.
[0077] Accordingly, the processing score of the cloud server, EdgeScore, can be expressed as: CloudScore=W_event×EventCloudScore + W_network×NetworkCloudScore +W_load×LoadCloudScore + W_rule×RuleCloudScore.
[0078] In one embodiment, after obtaining the processing score EdgeScore of the local server and the processing score EdgeScore of the cloud server, the two can be compared. If EdgeScore > CloudScore + k, the event can be routed to the local server for processing. If CloudScore > EdgeScore + k, the event can be routed to the cloud server for processing. If |EdgeScore - CloudScore| ≤ k, a hybrid routing strategy can be used for processing; for example, part of the event data can be routed to the local server for processing, and the other part can be routed to the cloud server for processing.
[0079] In some embodiments, when determining the event processing path, steps 201 to 203 may be skipped, and step 204 may be executed directly. That is, it may be directly determined whether the business rule corresponding to the event indicates the server that processes the event, and then the subsequent steps may continue.
[0080] In some embodiments, when determining the event processing path, after executing steps 201 to 203, the processing path of the event can be determined directly based on the type of the event, that is, steps 206 to 208 can be executed directly.
[0081] In some embodiments, when determining the event processing path, steps 201 to 205 may be omitted, and the event processing path may be determined directly based on the type of the event, that is, steps 206 to 208 may be executed directly.
[0082] The method for determining event processing paths in this embodiment of the invention can reduce the response time of the MES system to less than 10ms, thereby significantly improving the response speed of the MES system. Furthermore, during the event processing path determination process, by monitoring network status, routing strategies can be automatically adjusted based on changes in network status, achieving adaptive routing adjustment based on network status changes. Additionally, by monitoring the load of the cloud server and the local server, and automatically adjusting the routing strategy when the load changes, adaptive routing adjustment based on load changes is also achieved.
[0083] In practical applications, the weights or parameter values in the calculation process of the local server's EdgeScore and the cloud server's EdgeScore can be adjusted according to the actual impact of the event's processing path on the MES system and production, thereby making the server's processing score more accurate.
[0084] In one embodiment of the present invention, the MES system further includes: a cloud database connected to a cloud server, and a local database connected to a local server.
[0085] At this time, refer to Figure 3 The method may further include: Step 31: Capture and synchronize the data changes in the cloud database and the local database.
[0086] In practical implementation, a data synchronization unit can be set up during the data processing process. This data synchronization unit can use Change Data Capture (CDC) technology to capture data changes in real time and send the captured data to the synchronization queue for synchronization.
[0087] Specifically, the data synchronization unit may include a first change data capture module located in the cloud and a second change data capture module located locally. The first change data capture module is adapted to capture changes in the cloud database, including operations such as adding, modifying, and deleting data in the cloud. The second change data capture module is adapted to capture changes in the local database, including operations such as adding, modifying, and deleting local data.
[0088] The data synchronization unit also includes a synchronization queue. Captured data is sent to the synchronization queue, which can prioritize the received data. For example, critical data required for production (such as work order status and quality assessment) can be set to have the highest priority and synchronized first. Furthermore, the synchronization queue supports breakpoint resumption; that is, after a network interruption, the synchronization breakpoint is recorded, and synchronization resumes from the breakpoint after the network is restored, avoiding data duplication and loss.
[0089] In one embodiment, the method may further include: Step 32: Perform a consistency comparison on the data in the cloud database and the local database.
[0090] Step 33: When there is inconsistency between the data in the cloud database and the local database, resolve the inconsistency according to the preset conflict strategy, and synchronize the resolved data to the cloud database and the local database.
[0091] Specifically, regarding step 32, the data synchronization unit may further include a data comparison module and a conflict resolution module. The data comparison module can be used to perform a consistency comparison of the data in the cloud database and the local database, and output the comparison result. The conflict resolution module can resolve conflicts when there are inconsistencies between the data in the cloud database and the local database.
[0092] In practice, when resolving data conflicts, the conflict resolution module can prioritize conflict resolution based on the timestamps of inconsistent data. For example, it can overwrite older data with data that has a more recent timestamp (i.e., the latest data).
[0093] If the timestamps are the same or if timestamps cannot be used to resolve conflicts (e.g., data in the local database contains fault information), then the conflict can be resolved according to business rules. In general, using data from the local database is more in line with reality, so data from the local database can be used to overwrite data from the cloud database.
[0094] For example, the status field, completion quantity field, and fault information field in inconsistent data can be read separately. The status of the data in the local database can be overwritten with the status of the data in the cloud database. The completion quantity of the data in the local database can be overwritten with the completion quantity of the data in the cloud database. The fault information of the data in the local database can be overwritten with the completion quantity and fault information of the data in the cloud database.
[0095] For conflicts that cannot be resolved, conflict labeling information can be output, allowing humans to make decisions based on the labeled data.
[0096] The following example illustrates the data synchronization process: Assume work order number WO-20250115-001 is for producing 1000 units of product A. Initially, the work order status is "In Progress" and the completed quantity is 500 units. The data synchronization process at each moment is as follows: Time T0 (10:00:00): Initial state, the data in the cloud database and the local database are consistent; Time T1 (10:05:00): Local production report, operator reports 50 completed work.
[0097] Local database update: Completed quantity = 550, remaining quantity = 450.
[0098] The CDC captures the changes and adds them to the synchronization queue.
[0099] At time T2 (10:05:30): Equipment failure occurred. The specific fault information is: Equipment failure (motor overheating), and the equipment stopped running.
[0100] Local database update: Status="Abnormal pause", Fault information="Motor overheating".
[0101] The CDC captures the changes and adds them to the synchronization queue.
[0102] At time T3 (10:06:00): Work orders are being processed simultaneously in the cloud, and cloud planners are pausing work orders (planning adjustment). At this time, the cloud database is updated to: Status = "Plan Paused".
[0103] Data conflict arises because the same work order undergoes status changes simultaneously in the cloud and at the edge, with different status values.
[0104] Time T4 (10:06:01): Conflict detection.
[0105] The data comparison module detected conflicts: a conflict in the status field ("abnormal pause" vs "planned pause") and a conflict in the completion quantity field (550 vs 500).
[0106] Next, the data comparison module records the conflict information and pauses automatic synchronization.
[0107] At time T5 (10:06:02), the conflict resolution module resolves the conflict using the following specific conflict resolution strategy: First, because cloud data is updated with timestamps, but the local edge data database contains important fault information, timestamp updates are not applicable. Next, data is updated according to business rules. Specifically, the status field, completion quantity field, and fault information field in the inconsistent data are read separately. The status of the data in the local database is used to overwrite the status of the data in the cloud database; the completion quantity of the data in the local database is used to overwrite the completion quantity of the data in the cloud database; and the fault information of the data in the local database is used to overwrite the completion quantity and fault information of the data in the cloud database.
[0108] The conflict resolution result is as follows: Status = "Abnormal pause", Completed quantity = 550, Remaining quantity = 450, Fault information = "Motor overheating".
[0109] Time T6 (10:06:03): Data update, that is, the resolved data is synchronized and updated to the cloud database and the local database, and it is confirmed that the cloud database and the local database are completely consistent.
[0110] After the conflict is resolved, both the local and cloud databases are updated, ensuring real-time consistency between them and resolving data consistency issues. Additionally, a resume mechanism is supported to ensure no data loss occurs during network interruptions.
[0111] To enable those skilled in the art to better understand and implement the present invention, the apparatus, testing system, electronic device, and computer-readable storage medium corresponding to the above method are described in detail below.
[0112] Reference Figure 4 This invention also provides a data processing device 40, which may include: a data acquisition unit 41, an event generation unit 42, a type determination unit 43, and a path decision unit 44. Wherein: The acquisition unit 41 is adapted to acquire production-related data; The event generation unit 42 is adapted to generate corresponding events based on production-related data; The type determination unit 43 is adapted to determine the type of the generated event, wherein the type of the event is determined based on the real-time requirements of production-related data; The path decision unit 44 is adapted to determine the processing path of the event based on the type of the event, and to route the event to the corresponding server for processing according to the determined processing path.
[0113] In some embodiments, the acquisition unit 41 may include a data acquisition gateway and a data conversion module. The data acquisition gateway can be directly and physically connected to production equipment, sensors, controllers, and other devices within the manufacturing plant to acquire production-related data. The data conversion module can perform preprocessing such as filtering and format conversion on the acquired production-related data.
[0114] In some embodiments, refer to Figure 4 The device 40 may further include a data synchronization unit 45, adapted to capture and synchronize data changes in the cloud database and the local database.
[0115] In some embodiments, the data synchronization unit 45 is also adapted to perform a consistency comparison of the data in the cloud database and the local database; when there is inconsistency between the data in the cloud database and the local database, the inconsistent data is resolved according to a preset conflict strategy, and the resolved data is synchronized and updated to the cloud database and the local database.
[0116] The acquisition unit 41, event generation unit 42, type determination unit 43, path decision unit 44, and data synchronization unit 45 can be implemented with reference to the above method steps, and will not be repeated here.
[0117] Reference Figure 5 This invention also provides a MES system, which includes: Local server 51; Cloud server 52; and any of the data processing devices described in the above embodiments; The data processing device is connected to the local server 51 and the cloud server 52 respectively, and is adapted to collect production-related data and generate corresponding events. Based on the type of the generated event, the processing path of the event is determined, so as to route the event to the corresponding server for processing according to the determined processing path.
[0118] In practical implementation, the MES system can be applied to a variety of fields. For example, it can be an MES system for discrete manufacturing enterprises such as automobiles, electronics, and machinery, an MES system for process manufacturing enterprises such as chemicals, food, and pharmaceuticals, and an MES system for group enterprises with multiple factories and production lines.
[0119] In the MES system, the local server 51 can be deployed on-site at the factory, responsible for processing data sent to the local server 51 in real time. Specifically, the local server 51 can independently run core production operations, such as quality inspection and production statistics, with data stored in a local database. The cloud server 52 can perform unified management of production, business scheduling, and data analysis, with data stored in a cloud database. The local server 51 and the cloud server 52 can communicate with each other via an event-driven bus.
[0120] With the help of the data processing device, real-time business can be processed on the local server 51 to meet millisecond-level response requirements, while complex business can be processed on the cloud server to fully utilize cloud computing resources, thus solving the problems of insufficient real-time performance and uneven resource utilization. At the same time, the local server 51 can still operate independently when the network is disconnected, solving the problem of strong network dependence.
[0121] In some embodiments, the data processing device is integrated on the local server 51.
[0122] In other embodiments, the data processing device may also be independent of the local server 51.
[0123] In practice, there are two or more local servers 51, each corresponding to a manufacturing plant. For example, three local servers can be set up: a first local server 521, a second local server 522, and a third local server 523. The first local server 521 provides data processing services to plant A, the second local server 522 provides data processing services to plant B, and the third local server 523 provides data processing services to plant C.
[0124] Accordingly, there are two or more data processing devices, each corresponding to a local server. For example, a first data processing device 401 can be integrated into a first local server 521, a second data processing device 402 can be integrated into a second local server 522, and a third data processing device 403 can be integrated into a third local server 523.
[0125] Multiple local servers can connect to the same cloud server 52, allowing the same cloud server 52 to provide cloud data processing services to each factory. The data processing device ensures that the data in the cloud database remains consistent with that in each local database.
[0126] In some embodiments, multiple cloud servers may be set up, and data can be synchronized between the multiple cloud servers. Each cloud server provides cloud data processing services to the corresponding factory.
[0127] The MES system adopted in this embodiment of the invention can not only meet the requirements of millisecond-level real-time response, but also reduce network dependence and enable cross-factory collaboration and global optimization.
[0128] This invention also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of any of the above methods.
[0129] In specific implementations, the computer-readable storage medium may include ROM, RAM, disk, or optical disk, etc.
[0130] This invention also provides an electronic device, which includes a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor runs the computer program, it performs the steps of any of the methods described above.
[0131] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for various devices and products applied to or integrated into a chip, all of their modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits; for various devices and products applied to or integrated into a chip module, all of their modules / units can be implemented using hardware methods such as circuits, and different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The components can be implemented using software programs that run on the processor integrated within the chip module. The remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into the terminal, each of its components / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or in different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits.
[0132] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A data processing method, characterized in that, The method is applied to an MES system, which includes a local server and a cloud server; the method includes: Collect production-related data; Events are generated based on production-related data; The type of the generated event is determined based on the real-time requirements of production-related data; The processing path of the event is determined based on the type of the event, and the event is routed to the corresponding server for processing according to the determined processing path.
2. The data processing method as described in claim 1, characterized in that, The types of events include: Real-time events; Business events; And statistical events; The real-time requirement for the real-time event is greater than that for the business event, and the real-time requirement for the business event is greater than that for the statistical event.
3. The data processing method as described in claim 2, characterized in that, Determining the processing path for an event based on its type includes: Determine the current network status; When the current network is disconnected, the event is routed to the local server for processing; When the current network is in a non-disconnected state, the processing path of the event is determined based on the type of the event.
4. The data processing method as described in claim 3, characterized in that, When the current network is in a non-disconnected state, the processing path for the event is determined based on the type of the event, including: When the business rule corresponding to the event indicates the server to process the event, the event is routed to the indicated server for processing; When the business rule corresponding to the event does not indicate the server to process the event, the processing path of the event is determined according to the type of the event.
5. The data processing method as described in claim 4, characterized in that, Based on the type of the event, determine the processing path for the event, including: When the type of the event is a statistical event, the event is routed to a cloud server for processing; When the type of the event is a business event, the processing path of the event is determined based on the current load of the local server and the cloud server. When the event is a real-time event, the processing scores of the local server and the cloud server are calculated, and the processing path of the event is determined based on the score results.
6. The data processing method as described in claim 5, characterized in that, Based on the current load status of the local server and the cloud server, the processing path for the event is determined, including: Based on the load conditions of the local server and the cloud server, calculate the load utilization rate of each of the local server and the cloud server; The event processing path is determined based on the load utilization of the local server and the cloud server.
7. The data processing method as described in claim 6, characterized in that, The process of determining the event processing path based on the load utilization of the local server and the cloud server includes: When the load utilization of the local server is greater than the first load utilization threshold and the load score of the cloud server is less than the second load utilization threshold, the event is routed to the cloud server for processing. When the load score of the cloud server is greater than the first load utilization threshold and the load score of the local server is less than the second load utilization threshold, the event is routed to the local server for processing. The first load utilization threshold is greater than the second load utilization threshold.
8. The data processing method as described in claim 5, characterized in that, Calculate the processing scores for the local server and the cloud server respectively, and determine the processing path for the event based on the score results, including: Based on the current network status, the type of the event, the load situation, and the corresponding business rules, calculate the processing scores of the local server and the cloud server respectively. Compare the processing scores of the local server with the processing scores of the cloud server; The processing path for the event is determined based on the comparison results.
9. The data processing method as described in claim 1, characterized in that, The MES system further includes: a cloud database connected to a cloud server, and a local database connected to a local server; the method further includes: Capture and synchronize data changes in the cloud database and local database.
10. The data processing method as described in claim 9, characterized in that, The method further includes: A consistency comparison is performed between the data in the cloud database and the local database; When there is inconsistency between the data in the cloud database and the local database, the inconsistent data is resolved according to a preset conflict strategy, and the resolved data is synchronously updated to the cloud database and the local database.
11. The data processing method as described in claim 10, characterized in that, Inconsistent data is resolved according to a pre-defined conflict resolution strategy, including: Overwrite the inconsistent data with timestamp-prioritized data; When the timestamps of the inconsistent data are the same, the priority of the data is determined according to the business rules, and the data with higher priority overwrites the inconsistent data.
12. A data processing apparatus, characterized in that, The device is applied to an MES system, which includes a local server and a cloud server; the device includes: The data acquisition unit is suitable for collecting production-related data. The event generation unit is suitable for generating corresponding events based on production-related data. A type determination unit is adapted to determine the type of the generated event, wherein the type of the event is determined based on the real-time requirements of production-related data; The path decision unit is adapted to determine the processing path of the event based on the type of the event, and to route the event to the corresponding server for processing according to the determined processing path.
13. The data processing apparatus as claimed in claim 12, characterized in that, The MES system further includes: a cloud database connected to a cloud server, and a local database connected to a local server; the device further includes: The data synchronization unit is adapted to capture and synchronize data changes in the cloud database and the local database.
14. The data processing apparatus as claimed in claim 13, characterized in that, The data synchronization unit is also adapted to perform consistency comparison of the data in the cloud database and the local database; when there is inconsistency between the data in the cloud database and the local database, the inconsistent data is resolved according to a preset conflict strategy, and the resolved data is synchronized and updated to the cloud database and the local database.
15. A MES system, characterized in that, include: Local server; Cloud server; And the data processing apparatus according to any one of claims 12 to 14; The data processing device is connected to the local server and the cloud server respectively, and is adapted to collect production-related data and generate corresponding events. Based on the type of the generated event, the processing path of the event is determined, so as to route the event to the corresponding server for processing according to the determined processing path.
16. The MES system as described in claim 15, characterized in that, The data processing device is integrated on the local server.
17. The MES system as described in claim 15, characterized in that, The number of local servers is two or more, and each corresponds to a manufacturing plant.
18. The MES system as described in claim 17, characterized in that, The number of data processing devices is two or more, and each device corresponds to a local server.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement the steps of the method according to any one of claims 1 to 11.
20. An electronic device comprising a memory and a processor, wherein the memory stores a computer program capable of running on the processor, characterized in that, When the processor runs the computer program, it performs the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Single layer MIMO coverage enhancement using enhanced precoder codebook
WO2025115001A1
Load regulation method and device
CN106411971A
High-availability Internet of Things manufacturing execution system based on industrial Internet and production method
CN108540571A
Industrial Internet of Things intelligent gateway, networking system and data processing method
CN110650084A
Route switching method and device based on edge gateway equipment
CN119109927A