Multi-device collaborative control method and system for digital workshop based on Internet of Things
An event-driven system for real-time state monitoring and synchronized device control in digital factories addresses coordination delays between CNC machines and robotic arms, improving precision and consistency in high-precision manufacturing.
Patent Information
- Application Number
- CN202510541249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-04-28
AI Technical Summary
The prior art has a coordinated delay problem in the linkage scenarios between CNC lathes and assembly robotic arms, resulting in misalignment of assembly actions and it is difficult to meet the real-time demand of collaborative control in automated production lines with high beat and high consistency requirements.
By obtaining device status information, building an event queue and prioritizing identification, generating trigger instruction data, calibrating the device execution start time, and gradually correcting the control cycle using a time deviation reduction control method to ensure that the device response time and trigger time are synchronized.
It significantly reduces equipment response lag, improves the accuracy and consistency of collaborative responses, and is suitable for high-beat and low-tolerance precision manufacturing scenarios, solving the problems of misalignment and delay in assembly scenarios.
Smart Images

Figure CN120065962B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a multi-device collaborative control method and system for a digital workshop based on the Internet of Things. Background Art
[0002] In the prior art, a digital workshop interconnects various processing devices, sensors, and control systems by introducing Internet of Things technology to form a workshop control network that can be monitored in real time and executed automatically. Multi-device collaborative control usually relies on a central control platform. The platform collects the operating states, processing parameters, and workpiece information of each device, and then schedules different devices to perform collaborative operations according to a predetermined process. To achieve this goal, the existing system will set a unified communication protocol and data transfer mechanism to enable devices to share information and achieve task allocation. For example, when a device finishes processing, its status information is uploaded to the platform, and the platform arranges for the subsequent device to continue working, realizing automatic transfer and linkage.
[0003] However, in the specific scenario of the linkage between a numerically controlled lathe and an assembly robotic arm, the prior art has the problem of collaborative delay. Most current systems use a polling method to monitor the device status, with a certain data processing cycle, resulting in a delay when the assembly robotic arm receives the signal that the numerically controlled lathe has completed processing. In a high-efficiency workshop where the processed parts are small in size and the beat requirements are precise, this delay will cause misalignment of the assembly actions and affect the assembly quality. In addition, this polling mechanism may also lead to redundant data transmission and resource waste, and it is difficult to meet the real-time requirement of collaborative control for an automated production line with high beat and high consistency requirements. Summary of the Invention
[0004] The purpose of the present invention is to provide a multi-device collaborative control method and system for a digital workshop based on the Internet of Things, aiming to solve the problems mentioned in the background art.
[0005] To solve the above technical problems, the technical solution of the present invention is as follows:
[0006] In the first aspect, a multi-device collaborative control method for a digital workshop based on the Internet of Things, the method includes:
[0007] Obtain the status information of the first device during the execution of the processing task to obtain the original status data;
[0008] Perform judgment processing on the original status data, and generate a status change event when the process progress reaches a preset completion threshold or the running time exceeds a preset running time threshold;
[0009] According to the status change event, construct an event queue, organize various status change events into the queue in chronological order, and generate a pending scheduling event stream;
[0010] Based on the task identifier and process dependency relationship, identify the priorities of the to-be-scheduled event stream, determine the target status change event associated with the second device, and generate trigger instruction data;
[0011] According to the trigger instruction data, instruct the second device to execute the subsequent operation tasks, and calibrate the execution start time based on the trigger time to generate the action record of the second device;
[0012] Match the action record of the second device with the target status change event, and compare its recorded time with the trigger time. If the time deviation exceeds the tolerance interval, generate adjustment instruction data;
[0013] According to the adjustment instruction data, adopt the time deviation decreasing control method to gradually correct the control cycle of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, narrowing the time difference between the two.
[0014] Preferably, judge and process the original state data. When the process progress reaches the preset completion threshold or the running time exceeds the preset running time threshold, generate a status change event, including:
[0015] Calculate the change rate between the current process progress and the process progress of the previous cycle, and judge whether the change rate meets the preset growth threshold;
[0016] When the change rate meets the preset growth threshold, if the current process progress value is greater than or equal to the preset completion threshold, mark this moment as a trigger time candidate point;
[0017] Judge whether the current running time exceeds the preset running time threshold. If any of the conditions is met, generate a status change event, and the status change event includes the target task identifier, the event trigger time, and the corresponding process number.
[0018] Preferably, based on the task identifier and process dependency relationship, identify the priorities of the to-be-scheduled event stream, determine the target status change event associated with the second device, and generate trigger instruction data, including:
[0019] Construct dependency relationship structure data with the task identifier as the node and the process dependency as the edge;
[0020] According to the dependency relationship structure data, find the upstream nodes directly adjacent to the task identifier of the second device, and screen out the corresponding status change events from the to-be-scheduled event stream to generate to-be-sorted status change event data;
[0021] Sort the status change events in the to-be-sorted status change event data based on the priority calculation function to generate numerical priority weight data, and the priority calculation function takes the event timestamp, task urgency, and the current load status of the second device as input factors;
[0022] According to the numerical priority weight data, select the state change event with the highest priority as the target event, and extract its task identifier, process number, and trigger time to form the trigger instruction data.
[0023] Preferably, according to the adjustment instruction data, adopt a time deviation decreasing control method to gradually correct the control period of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, narrowing the time difference between the two, including:
[0024] Construct a time adjustment function based on the principle of proportional control. The time adjustment function takes the time deviation between the execution response time of the previous cycle and the current trigger time as the input and outputs a step correction value;
[0025] Apply the step correction value to the control period setting value of the second device to generate a new cycle adjustment parameter, and load this parameter into the local control module of the second device;
[0026] Continuously monitor the execution response time in the new cycle, and calculate the difference from the latest trigger time. If the time deviation exceeds the tolerance interval, continue to recursively calculate the step correction value for the next cycle based on the current deviation value.
[0027] Preferably, calculate the change rate between the current process progress and the process progress of the previous cycle, and determine whether the change rate meets the preset growth threshold, including:
[0028] Construct a process progress change rate function with the difference between the current cycle process progress value and the previous cycle process progress value as the numerator and the current cycle time interval as the denominator, and calculate the change rate value;
[0029] Compare the change rate value with the preset growth threshold. If the change rate value is greater than or equal to the preset growth threshold in two consecutive cycles, it is determined that the progress is steadily increasing, and the event trigger determination stage is allowed to enter;
[0030] If the change rate value fluctuates significantly and exceeds the set fluctuation tolerance range, interrupt the generation of the state change event in this cycle.
[0031] Preferably, the modeling method for the current load state of the second device includes:
[0032] Based on indicators such as the running queue length, average task execution time, and resource occupancy rate, comprehensively model the current load state of the second device to construct a load state evaluation function;
[0033] Calculate the current load value according to the load state evaluation function.
[0034] Preferably, the tolerance interval setting mechanism includes:
[0035] Based on historical cycle data, obtain the time deviation values between the execution response times and the corresponding trigger times of the second device in multiple consecutive cycles to obtain historical deviation data;
[0036] Adopt a weighted average method to process the time deviation values in the historical deviation data and calculate the average reference value of the current time deviation;
[0037] According to the average reference value of the current time deviation, set the expansion ratio parameter, and multiply the average reference value by the expansion ratio parameter to obtain the upper and lower limits of the tolerance interval for the current cycle;
[0038] Among them, the expansion ratio parameter can be preset or dynamically adjusted according to the type, accuracy level or execution stage of the operation task.
[0039] In a second aspect, a multi-device collaborative control system for a digital workshop based on the Internet of Things, the system includes:
[0040] An acquisition module, configured to obtain the status information of the first device during the execution of the processing task to obtain the original status data, where the status information includes a task identifier, the current process progress, and the running timestamp;
[0041] A status judgment module, configured to perform judgment processing on the original status data, and generate a status change event when the process progress reaches a preset completion threshold or the running time exceeds a preset running time threshold, where the status change event includes a target task identifier, an event trigger time, and the corresponding process number;
[0042] A pending scheduling event generation module, configured to construct an event queue according to the status change event, organize various status change events into the queue in chronological order, and generate a pending scheduling event stream;
[0043] A trigger instruction generation module, configured to perform priority identification on the pending scheduling event stream based on the task identifier and the process dependency relationship, determine the target status change event associated with the second device, and generate trigger instruction data;
[0044] A recording module, configured to instruct the second device to execute the subsequent operation task according to the trigger instruction data, and calibrate the execution start time based on the trigger time to generate an action record of the second device;
[0045] An adjustment instruction generation module, configured to match the action record of the second device with the target status change event, and compare the recorded time with the trigger time. If the time deviation exceeds the tolerance interval, adjustment instruction data is generated;
[0046] An adjustment module, which is used to gradually correct the control cycle of the second device according to the adjustment instruction data by using a time deviation decreasing control method, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, and the time difference between the two is reduced.
[0047] The above solution of the present invention has at least the following beneficial effects:
[0048] The multi-device collaborative control method for a digital workshop based on the Internet of Things provided by the present invention constructs original state data by obtaining status information such as task identification, process progress, and running timestamp in real time during the processing of the first device, replacing the mechanism of the traditional system that initiates scheduling after the result is uploaded, making the event trigger judgment have stronger foresight. Different from the periodic polling method adopted by the prior art, this solution adopts an event trigger mechanism to respondently identify the device status. Once the process progress reaches the preset condition or the running time exceeds the set threshold, a status change event is immediately generated and the scheduling process is initiated, significantly reducing the problem of delayed triggering.
[0049] By constructing an event queue and generating a to-be-scheduled event stream, the orderly management of status change events of multiple devices is realized, and the target device can be identified based on the task identification and process dependency relationship, so that the scheduling instruction is accurately and efficiently sent to the associated second device, ensuring that the process flow conforms to the process path requirements. Especially before the second device executes the task, the start time of its execution is synchronously calibrated based on the trigger time, making the operation behavior strictly aligned with the time reference, and solving the problem of the action deviation of the assembly robot arm.
[0050] In addition, the present invention introduces a feedback mechanism after the execution. By collecting the action records of the second device and comparing its response time with the trigger time of the status change event, if the deviation exceeds the tolerance interval, an adjustment instruction is automatically generated, and the control cycle of the second device is gradually corrected by using a time deviation decreasing control method. This progressive adjustment avoids large fluctuations and out-of-control rhythms, realizes the per-cycle convergence of device behavior, and ensures that the collaborative beat gradually becomes stable and consistent.
[0051] In summary, the present invention not only fundamentally reduces the assembly response lag problem caused by polling delay, but also improves the accuracy and consistency of collaborative response. It is applicable to high-beat and low-tolerance precision manufacturing scenarios, has higher rhythm control flexibility, lower scheduling waiting costs, and stronger time synchronization capabilities, and solves the key problems of misalignment, delay, and resource redundancy in the prior art in the assembly scenario. Description of the Drawings
[0052] Figure 1 It is a flowchart of the multi-device collaborative control method for a digital workshop based on the Internet of Things provided by the embodiments of the present invention. Detailed Embodiments
[0053] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0054] As Figure 1 shown, an embodiment of the present invention proposes a multi-device collaborative control method for a digital workshop based on the Internet of Things. The method includes:
[0055] S100. Obtain the status information of the first device during the execution of the processing task to obtain the original status data. The status information includes a task identifier, the current process progress, and a running timestamp.
[0056] S200. Perform judgment processing on the original status data. When the process progress reaches a preset completion threshold or the running time exceeds a preset running time threshold, generate a status change event. The status change event includes a target task identifier, an event trigger time, and a corresponding process number.
[0057] S300. According to the status change event, construct an event queue, organize various status change events into the queue in chronological order, and generate a pending scheduling event stream.
[0058] S400. Based on the task identifier and the process dependency relationship, perform priority identification on the pending scheduling event stream, determine the target status change event associated with the second device, and generate trigger instruction data.
[0059] S500. According to the trigger instruction data, instruct the second device to execute the subsequent operation task, and calibrate the execution start time based on the trigger time to generate a second device action record.
[0060] S600. Match the second device action record with the target status change event, and compare the recorded time and the trigger time. If the time deviation exceeds the tolerance interval, generate adjustment instruction data.
[0061] S700. According to the adjustment instruction data, adopt a time deviation decreasing control method to gradually correct the control period of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, and the time difference between the two is reduced.
[0062] In the embodiments of the present invention, by constructing a complete state perception, event-driven, task scheduling, time calibration, and feedback correction mechanism, high-precision cooperative control of multiple devices in a digital production environment is achieved. The entire control process takes the first device as the information source, and key state information such as task identification, current process progress, and running timestamp is collected during its processing task, thereby obtaining raw state data with time sequence and task attributes. The raw state data not only has the real-time characteristics of the processing process but also has a continuous data basis for event trigger judgment, enabling subsequent judgment processing to have data traceability and process consistency.
[0063] By introducing an event trigger mechanism to replace the traditional periodic polling method, the raw state data is judged and processed, and dual-threshold conditions based on process progress and running time are set, effectively improving the accuracy and scenario adaptability of the trigger conditions. After any threshold condition is met, the system immediately generates a state change event, which includes task identification, trigger time, and process number, etc., ensuring that the event carries all the information required for upstream and downstream scheduling.
[0064] By constructing an event queue and organizing events into the queue in chronological order, the system forms a schedulable event stream that can be continuously processed, providing a clear data structure basis for subsequent task distribution. The event queue achieves logical isolation in form and has a scheduling buffer capacity in function, especially suitable for multi-task and concurrent device operation scenarios.
[0065] In the task scheduling stage, by analyzing the task identification and process dependency relationship, the target state change event that the second device currently needs to execute is identified. The scheduling system has a priority sorting mechanism to ensure that the most urgent and most suitable task for the current device state is dispatched first. This method can prevent problems such as disordered scheduling and repeated execution of devices under resource competition.
[0066] Furthermore, the system calibrates the execution start time of the second device with the trigger time as the time reference, so that the operation response is strictly aligned with the upstream event node, thereby enhancing the time consistency of multi-device cooperation. After the second device executes the task, an action record is generated for subsequent feedback evaluation.
[0067] The system continuously compares the response time and trigger time in the action record. If the deviation exceeds the set tolerance range, adjustment instruction data will be automatically generated to trigger subsequent fine-tuning operations of the control cycle. Finally, through the time deviation decreasing control method, the execution response of the second device approaches the target trigger moment cycle by cycle, thereby achieving high-precision alignment of the rhythm between devices and significantly improving the consistency and beat stability of cooperative actions.
[0068] In summary, this method has the overall collaborative capabilities of timely information acquisition, precise scheduling response, and adaptive correction of equipment rhythm, and is particularly suitable for manufacturing process scenarios with high beat and precise linkage. It can effectively solve the problem of collaborative misalignment caused by state synchronization delay in traditional systems.
[0069] Among them, the state information of the first device during the execution of the processing task is obtained to get the original state data. The state information includes a task identifier, the current process progress, and the running timestamp. Specifically:
[0070] In the existing digital production workshop, the first device is usually a numerical control machine tool, a laser cutting machine, or other automated processing units, and its control system has the function of real-time data acquisition. In this step, by calling the control interface or acquisition module of the first device, the key state information during its task execution is continuously obtained. This information mainly includes:
[0071] First, the task identifier, which is usually generated by the workshop scheduling system when issuing the task, is a code that uniquely identifies the task currently executed by the device and is used to distinguish task records in different batches, products, or operation processes.
[0072] Second, the current process progress, which represents the execution ratio of the task in the current process flow. This progress data can be calculated based on the ratio of the number of completed steps to the total number of steps of the processing program, or can be estimated by the internal sensor of the device detecting the processing completion situation. For example, when processing complex parts, the device may split the entire task into multiple stages, such as rough machining, finish machining, cleaning, etc., and the system can update the progress when each stage is completed.
[0073] Third, the running timestamp, which refers to the system time record of the device at a certain moment and is used to synchronize the operation timings between different devices. This timestamp can be directly obtained from the built-in clock of the device control system and is usually stored in the standard coordinated time format.
[0074] After jointly recording the above three types of data, the original state data with time attributes and process progress attributes is formed. These original data not only retain the process information of the task but also provide structured and time-sequenced basic information for subsequent event judgment and task scheduling. By uploading the state data to the upper-level system through a standard Internet of Things communication protocol (such as MQTT or OPC UA), the timeliness and consistency of the data can be ensured.
[0075] Among them, the action record of the second device is matched with the target state change event, and its record time is compared with the trigger time. If the time deviation exceeds the tolerance interval, adjustment instruction data is generated. Specifically:
[0076] In the existing multi-device collaborative control system, the task connection between different devices often relies on the event-driven mechanism for coordination. This step aims to evaluate the response timeliness of the second device to the scheduling instruction, so as to determine whether its actions need to be corrected.
[0077] First, when the system issues the trigger instruction data to the second device, it associates a target state change event with this instruction. This event contains key information such as the event trigger time, task identifier, and process number. After the second device completes receiving the instruction and executes the corresponding operation, the system will automatically record its action response time, that is, the response timestamp in the action record.
[0078] To ensure the temporal consistency of task collaboration, the system needs to match this action record with the original state change event one by one. The matching logic is bound based on the uniqueness of the task identifier to ensure that this action is indeed a response to this event, rather than other operation records.
[0079] After the matching is completed, the system extracts the actual response time from the action record and compares it with the trigger time in the state change event. This comparison is a time difference evaluation process, whose purpose is to quantify the response delay. For example, if the trigger time of the state change event is 10:00:00 and the action record of the second device shows 10:00:03, then the time deviation is 3 seconds.
[0080] The system presets a group of response deviation tolerance intervals to determine whether this deviation is within an acceptable range. The tolerance interval can be a fixed value or dynamically generated from historical deviation data. For example, for an assembly process with strict beat requirements, this interval can be set to ±1 second; in general scenarios, it may be ±3 seconds.
[0081] If the comparison result shows that the response deviation falls within the tolerance interval, the system considers that the device execution is in a stable state and no intervention is required. If the deviation exceeds the tolerance interval, for example, the response delay reaches more than 5 seconds, the system determines that the current rhythm is misaligned and needs to be corrected.
[0082] At this time, the system generates adjustment instruction data, which includes device identifier, correction duration, and control instruction parameters. The instruction is issued to the local control module of the second device and will be adjusted periodically according to the deviation degree. For example, moderately advance the start time of the next response, or compress the time window of the next control cycle, so as to gradually guide the device response to return to the trigger time benchmark, thereby achieving the adaptive convergence control of the time deviation.
[0083] Through this processing process, the method realizes the closed-loop alignment of the device response behavior and the task rhythm, which not only improves the synchronization stability in multi-device collaboration, but also reduces the risk of process misalignment caused by the accumulation of response deviations.
[0084] In a preferred embodiment of the present invention, the original state data is judged and processed. When the process progress reaches the preset completion threshold or the running time exceeds the preset running time threshold, a state change event is generated, including:
[0085] Calculate the change rate between the current process progress and the process progress of the previous cycle, and judge whether the change rate meets the preset growth threshold;
[0086] When the change rate meets the preset growth threshold, if the current process progress value is greater than or equal to the preset completion threshold, mark this moment as a candidate trigger time point;
[0087] Judge whether the current running time exceeds the preset running time threshold. If any of the conditions is met, a state change event is generated. The state change event includes the target task identifier, the event trigger time, and the corresponding process number.
[0088] In the embodiment of the present invention, during the process of the first device executing the processing task, the system real-time collects its current process progress and running time, and dynamically evaluates whether to enter the event trigger condition according to the change of the state data between two consecutive cycles. By constructing a progress change rate function, calculate the increase of the current process progress compared with the previous cycle, ensuring the continuity of the trigger judgment for event generation. By using the rate judgment method, it can effectively filter out misjudgments caused by sudden jumps or system noise interference.
[0089] When the progress growth rate is higher than the set growth threshold for two consecutive cycles, and the current progress value reaches or exceeds the set completion progress threshold, the system marks the current time point as a potential event trigger timing point. At the same time, the system parallelly judges whether the running time of the current task exceeds the upper limit as an auxiliary judgment logic to further enhance the redundancy judgment ability of the system.
[0090] Generating a state change event based on the above dual judgment mechanism not only improves the judgment accuracy but also enhances the adaptability to the task complexity and dynamics in multi-process scenarios, can significantly reduce the generation of invalid events, and improve the structural rationality of the entire event stream and the effectiveness of execution triggering.
[0091] In a preferred embodiment of the present invention, based on the task identifier and process dependency relationship, the priority of the to-be-scheduled event stream is identified, and the target state change event associated with the second device is determined, and trigger instruction data is generated, including:
[0092] Construct dependency relationship structure data with the task identifier as the node and the process dependency as the edge;
[0093] According to the dependency relationship structure data, search for the upstream node directly adjacent to the second device task identifier, and filter out the corresponding status change events from the to-be-scheduled event stream to generate to-be-sorted status change event data;
[0094] Sort the status change events in the to-be-sorted status change event data based on the priority calculation function to generate numerical priority weight data, where the priority calculation function takes the event timestamp, task urgency, and the current load status of the second device as input factors;
[0095] Among them, ;
[0096] is the event priority of the status change event, , , are the weight parameters for priority calculation, corresponding to the timestamp freshness, task urgency, and device load value respectively, satisfying , is the timestamp generated for the status change event, is the current system time, is the time normalization scale parameter, is the task urgency item, , , are the weight coefficients of the task urgency, corresponding to the deadline, process priority, and resource risk respectively, satisfying , is the deadline of the task, is the maximum execution time limit allowed for the task, is the process number of the current task in the product process chain, and the process number is an integer, is the average value of the process numbers in the current task pool, is the expected resource quantity occupied by the current task, is the maximum total resource capacity that can be accommodated;
[0097] According to the numerical priority weight data, select the status change event with the highest priority as the target event, and extract its task identifier, process number, and trigger time to form trigger instruction data.
[0098] In the embodiments of the present invention, through the structured recognition and priority sorting of the to-be-scheduled event stream, the rationality of multi-device task coordinated scheduling is improved. On the basis of establishing the mapping relationship between the task identifier and the process dependency, the system constructs a dependency relationship structure data structure, expresses the process order in units of task nodes, and locates the upstream task nodes corresponding to the second device in a graph traversal manner.
[0099] The system filters out the status change events that match the upstream node from the event stream and constructs a set of data to be sorted for these candidate events. During the sorting process, the priority calculation function takes three key factors as input: one is the event timestamp, which is used to measure the sequence of event generation; the second is the task urgency, which is used to reflect the weight level of the task in the overall scheduling process; the third is the current load status of the second device, which is used to evaluate the immediate ability of the device to process new tasks.
[0100] Through the weighted combination of the above factors, the system obtains the priority value of each event and selects the highest one as the final target status change event. This event is parsed and the task identifier, process number, and trigger time are extracted to form complete trigger instruction data, which is transmitted to the second device for task scheduling.
[0101] This scheduling method has three advantages: logical consistency oriented to the process flow, real-time response, and device status perception ability. It can effectively avoid problems such as task congestion, scheduling disorder, and uneven device load, and improve the overall orderliness of the production process and the scheduling efficiency of system resources.
[0102] In a preferred embodiment of the present invention, according to the adjustment instruction data, a time deviation decreasing control method is adopted to gradually correct the control period of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, reducing the time difference between the two, including:
[0103] Construct a time adjustment function based on the proportional control principle. The time adjustment function takes the time deviation between the execution response time of the previous cycle and the current trigger time as input and outputs a step correction value;
[0104] Among them, ;
[0105] is the step correction value of the control period for the next cycle, is the deviation between the response time of the current cycle and the trigger time, defined as , is the deviation of the previous cycle time, is the actual response time, is the target trigger time, 、 、 are the proportional, integral, and differential control coefficients;
[0106] Apply the step correction value to the control period setting value of the second device to generate a new cycle adjustment parameter, and load this parameter into the local control module of the second device;
[0107] The execution response time in the new cycle is continuously monitored, and the difference is calculated with the latest trigger time. If the time deviation exceeds the tolerance interval, the step correction value of the next cycle is recursively calculated based on the current deviation value.
[0108] In an embodiment of the present invention, in a multi-device collaborative control system, due to the physical response delay, task execution difference and network transmission fluctuation between the first device and the second device, if feedback correction is not performed, the operation rhythm may gradually deviate from the target trigger time. To this end, this embodiment provides a correction strategy based on a time deviation decreasing control method, which is used to dynamically adjust the control cycle of the second device to ensure that its execution rhythm can gradually align with the target trigger time.
[0109] After each execution cycle is completed, this solution continuously obtains the actual response time of the second device and calculates the difference with the trigger time in the trigger instruction data generated in the previous stage. Through this comparison, it is determined whether the current execution response deviates from the collaborative reference time and a closed-loop feedback path is constructed. The system enters the cycle correction stage based on the time deviation as input.
[0110] The time adjustment function is constructed using the proportional control principle so that each correction has a controllable adjustment step. The input of the time adjustment function is the deviation value of the previous cycle, and the output is the step correction value, which determines the increase or decrease in the control cycle parameter in the current cycle, thereby avoiding large fluctuations and causing system oscillations, and having good adjustment stability. The generated control cycle adjustment parameters are loaded into the local control module of the second device to achieve local fine-tuning of the rhythm.
[0111] The correction strategy is not adjusted in one go, but is based on continuous cycles, using a "cycle-by-cycle approach" to continuously reduce the difference between the response time and the target trigger time. Each round of deviation feedback calculation is recursively calculated based on the most recent calibration result, so that the overall rhythm tends to converge. This mechanism is suitable for scenarios with small drift or system error accumulation. It gradually achieves high-precision synchronization through fine-tuning, improving system robustness and task consistency.
[0112] The implementation results show that the control strategy effectively reduces the task response misalignment caused by time drift, and is particularly suitable for the collaborative control environment of precision equipment under high-beat production rhythm requirements, with good versatility and control accuracy.
[0113] Among them, the proportional control principle is a feedback adjustment mechanism widely used in automatic control systems. It is suitable for continuous error correction scenarios, especially in the response time calibration of industrial automation equipment. The core idea of this principle is to calculate the adjustment amount proportionally according to the deviation between the current system output and the target setting value, so that the output gradually approaches the target state.
[0114] In this method, there is a deviation between the response time and the corresponding trigger time of the second device, which may be caused by device inertia, network latency, or task fluctuations. In order to make the execution cycle of the second device gradually approach the preset trigger time, a correction action needs to be performed based on the above deviation.
[0115] When using the proportional control principle for correction, the system uses the time deviation of each cycle as the adjustment basis. The adjustment amplitude is proportional to this deviation. That is to say, when the deviation is large, the correction action is large; when the deviation gradually decreases, the adjustment amplitude also becomes smaller and finally stabilizes. This process avoids overcorrection and system oscillation, and is a control strategy with good linear stability.
[0116] In specific implementation, the adjustment sensitivity can be controlled by setting a proportional coefficient. For example, when the proportional coefficient is large, the system is more sensitive to the deviation and is suitable for high-precision tasks; when the proportional coefficient is small, the adjustment action is smoother and is suitable for tasks with a higher tolerance for the beat. Proportional control has the characteristics of a simple algorithm structure and a fast response speed, and is very suitable for application in periodic deviation correction scenarios.
[0117] The time adjustment mechanism constructed by the proportional control principle can achieve real-time adjustment of the control rhythm of the second device without introducing a complex prediction model, thereby improving the consistency of coordinated operation between devices.
[0118] In a preferred embodiment of the present invention, calculate the change rate between the current process progress and the process progress of the previous cycle, and determine whether the change rate meets a preset growth threshold, including:
[0119] Construct a process progress change rate function with the difference between the current cycle process progress value and the previous cycle process progress value as the numerator and the current cycle time interval as the denominator, and calculate the change rate value;
[0120] Compare the change rate value with the preset growth threshold. If the change rate value is greater than or equal to the preset growth threshold in two consecutive cycles, it is determined that the progress is steadily increasing and permission is given to enter the event trigger determination stage;
[0121] If the change rate value shows large fluctuations and exceeds the set fluctuation tolerance range, the generation of the status change event for this cycle is interrupted.
[0122] In an embodiment of the present invention, in order to further improve the reliability of state change event generation, the dynamic change trend of the process progress is introduced in the judgment stage in this embodiment, avoiding incorrect judgments caused by occasional sudden increases or system abnormal data. By calculating the change rate between the process progress in the current cycle and that in the previous cycle, a trend judgment on the process execution state is achieved. The change rate is based on the progress difference and constructs a rate function in combination with the time interval, clearly reflecting the accelerating or stagnating trend of the process execution.
[0123] If the progress change rates in two consecutive cycles are both higher than the preset growth threshold, the system determines that the progress is in a stable growth state and allows entry into the event trigger determination stage, thus avoiding the generation of unnecessary events caused by temporary fluctuations or false data.
[0124] In addition, to enhance the system's response ability to sudden fluctuations, a fluctuation tolerance control strategy is also introduced. When the change rate value shows an abnormally large jump between adjacent cycles and exceeds the set fluctuation tolerance range, the system will automatically interrupt the current round of event judgment operations. This measure can effectively block the influence of non - technological factors such as data noise, equipment failures, or network delays on the state judgment.
[0125] By introducing the dual mechanisms of rate judgment and fluctuation tolerance control, the system can achieve multi - angle monitoring of the task execution trend, making the generation of state change events more in line with the true state of the process, and significantly improving the accuracy and execution efficiency of overall scheduling.
[0126] In a preferred embodiment of the present invention, a method for modeling the current load state of a second device includes:
[0127] Based on the running queue length, average task execution time, and resource occupancy rate indicators, comprehensively model the current load state of the second device to construct a load state evaluation function;
[0128] Calculate the current load value according to the load state evaluation function;
[0129] Wherein, ;
[0130] is the current load value, is the current task queue length of the second device, is the maximum task queue capacity, is the average execution time of the current task, is the reference average task time for normalization, is the current resource occupancy rate, with a value range of [0, 1], 、 、 are weight coefficients, satisfying .
[0131] In the embodiments of the present invention, by collecting and calculating the device operation queue length, the average task execution time, and the resource occupancy rate in three dimensions, a comprehensive evaluation of the load status of the second device is achieved.
[0132] The operation queue length reflects the queuing situation of tasks waiting to be executed, and can reflect the scheduling pressure of the device; the average task execution time represents the current task complexity and is suitable for predicting whether subsequent tasks are easy to insert and execute; the resource occupancy rate includes the current load of the core components or controllers of the device and can evaluate the idle capacity of the device in the current time slice.
[0133] The three indicators are fused and modeled through a unified load status evaluation function to form a single numerical load result, which is convenient for subsequent use in the scheduling and sorting algorithm. This load value, as an important input for judging the device scheduling priority, can significantly improve the pertinence of the scheduling strategy and enable the system to have the ability of dynamic adjustment in the face of multiple tasks and different resource states.
[0134] The implementation effect shows that after introducing such a load modeling mechanism, the device scheduling result is significantly improved, the resource utilization rate is increased, the task conflict rate and the device idling risk are reduced, and the adaptability of the scheduling system to the production rhythm fluctuation is effectively enhanced.
[0135] In a preferred embodiment of the present invention, the tolerance interval setting mechanism includes:
[0136] Based on the historical cycle data, obtain the time deviation values between the execution response time and the corresponding trigger time of the second device in multiple consecutive cycles to obtain historical deviation data;
[0137] Adopt a weighted average method to process the time deviation values in the historical deviation data and calculate the average reference value of the current time deviation;
[0138] According to the average reference value of the current time deviation, set the expansion ratio parameter, and multiply the average reference value by the expansion ratio parameter to obtain the upper and lower limits of the tolerance interval of the current cycle;
[0139] Among them, the expansion ratio parameter can be preset or dynamically adjusted according to the type, accuracy level, or execution stage of the operation task.
[0140] In the embodiments of the present invention, for the time deviation problem between the trigger time and the response time during the task execution process, a tolerance interval setting mechanism based on historical data driving is provided to improve the stability and adaptability of the deviation judgment.
[0141] In multiple consecutive execution cycles, the system continuously records the actual response time of the second device and the corresponding trigger time, and stores the time difference for each cycle. These time deviation values constitute a historical deviation data set, which serves as the basic data source for dynamic judgment.
[0142] By performing weighted average processing on this historical deviation data set, the system can obtain a reference average deviation value. To improve adaptability, an extended ratio parameter is further introduced, which is set according to the task accuracy requirement or process stage and is used to control the tolerance bandwidth. The system multiplies the average deviation value by the extended ratio parameter to obtain the upper and lower limits of the tolerance interval for the current cycle, which is used to determine whether the deviation within this cycle is within the acceptable range.
[0143] This dynamic setting mechanism has stronger flexible control ability compared with the traditional fixed threshold method. Especially in the case where the state differences of multiple devices are obvious and the task complexity fluctuates greatly, it can adjust the judgment benchmark in real time to avoid mis-correction or missed correction caused by unreasonable threshold setting.
[0144] The results show that this tolerance setting mechanism improves the recognition accuracy and tolerance of the system for collaborative control errors, helps to maintain the rhythm continuity, adapts to the high-frequency collaborative control environment, and further enhances the stable operation ability of the entire system.
[0145] Among them, historical cycle data refers to the response behavior records generated during the continuous execution of multiple operation cycles by the second device, which is used to reflect the device execution stability and timing fluctuation conditions. In this method, the acquisition range of historical cycle data includes two key time points within each cycle: namely, the task trigger time sent by the system and the actual response time recorded by the second device.
[0146] The difference between each pair of trigger time and response time is defined as the response deviation of a single cycle. The system records and archives the response deviations of multiple consecutive cycles to form a historical deviation data set with time series attributes. Usually, this data set will include at least three or more consecutive execution cycles to ensure the statistical validity of the average calculation.
[0147] These historical cycle data can reflect the beat change trend of the device during recent operation. If the response deviations of most cycles are small, it indicates that the device runs stably; otherwise, it indicates that there may be fluctuations or rhythm drifts. By processing this data set, it can provide a dynamic basis for the setting of the tolerance interval and realize the transformation from static empirical setting to data-driven determination.
[0148] In actual engineering, historical cycle data can be automatically collected and stored by the device control system, the upper scheduling platform or the middleware system, and can support continuous update in a rolling window manner to ensure its timeliness and representativeness.
[0149] Among them, the expansion ratio parameter can be preset or dynamically adjusted according to the type of operation task, precision level, or execution stage. Specifically:
[0150] The expansion ratio parameter is used to adjust the tolerance bandwidth of the response deviation and is a key control factor in the tolerance interval setting mechanism. In practical applications, this parameter should not be fixed but should be adaptively set according to the specific situation of task execution.
[0151] First, starting from the type of operation task, different types of tasks have different requirements for timing response. For example, for assembly tasks, millisecond-level docking between devices is required, and the tolerance should be set relatively small; while for handling or buffering tasks, the beat tolerance is higher, and the tolerance can be appropriately relaxed. Therefore, the system can pre-establish a mapping relationship between different task types and the corresponding expansion ratio parameters and automatically match them during task scheduling.
[0152] Second, when considering the precision level, for precision manufacturing tasks with high requirements, such as high-precision interpolation machining and positioning detection, the time error must be strictly controlled, and the expansion ratio parameter should be set to a smaller value; while in general tolerance tasks, the control parameters can be appropriately relaxed according to the set process standards.
[0153] Third, the differences in the task execution stage also affect the setting of the expansion parameter. For example, in the startup stage, the device response may fluctuate, and it is suitable to use a larger expansion ratio parameter to avoid misjudgment; while in the stable stage of the middle and later stages, a smaller ratio should be adopted to improve the synchronization accuracy.
[0154] In system implementation, the expansion ratio parameter can be either statically configured by the scheduling system or dynamically adjusted by the algorithm according to the historical execution effect. The dynamic adjustment can refer to the stability indicators in the historical cycle data, such as deviation variance, maximum offset, etc., and adaptively shrink or relax the tolerance boundary according to these indicators to achieve the balance between response accuracy and system robustness.
[0155] For example: the setting logic of the expansion ratio parameter and the actual industrial application scenarios, its value range needs to be differentially set in combination with factors such as task type, precision level, execution stage, etc., as shown in Tables 1 to 3 below:
[0156] Table 1: Value range of expansion ratio parameter divided by task type
[0157] Task Type Typical scenarios Expand the range of scale parameters illustrate High-precision assembly tasks Precision parts docking, automated welding, etc. [0.5,1.0] The timing deviation needs to be strictly controlled (millisecond level), the tolerance interval is small, and the proportional parameter takes a low value to reduce the bandwidth. Conventional machining tasks Turning, milling, general handling, etc. [1.0,2.0] A moderate degree of deviation (seconds) is allowed, and the scale parameter takes a median value to balance accuracy and system stability. Low-beat cache tasks Temporary storage of materials and connection of non-real-time processes [2.0,3.0] The timing requirements are loose, the tolerance interval can be larger, and the proportional parameter takes a high value to avoid frequent corrections.
[0158] Table 2: Value range of expansion ratio parameter divided by precision level
[0159] Accuracy level Typical scenarios Expand the range of scale parameters illustrate Precision level (±1ms) Semiconductor manufacturing, precision instrument processing [0.3,0.8] Strictly limit the tolerance, the ratio parameter must be less than 1 to ensure that the deviation is controlled within a very small range. Normal level (±10ms) General machining, conventional automated production lines [0.8,1.5] For medium precision requirements, the ratio parameter covers about 1, balancing the control accuracy and algorithm complexity. Loose level (±100ms+) Logistics transportation, asynchronous task scheduling [1.5,3.0] Larger deviations are allowed, and the ratio parameter takes a high value to adapt to low-beat scenarios.
[0160] Table 3: Value range of the expansion ratio parameter divided by execution stage
[0161] Execution Phase Typical status Expand the range of scale parameters illustrate Startup / debugging phase Equipment initialization and parameter calibration [2.0,3.0] Large fluctuations are allowed, and the proportional parameter is taken to a high value to avoid misjudging the initial response deviation. Stable operation stage Continuous production and regular task execution [0.5,1.5] In order to pursue the timing synchronization accuracy, the ratio parameter takes a medium-low value to gradually converge the deviation. Closing / Switching Phase Task completed, device status switched [1.5,2.5] A certain degree of deviation is allowed, and the proportional parameters take medium-high values to reduce the adjustment pressure during the transition stage.
[0162] Combined with the above scenarios, the general value range of the expansion ratio parameter is [0.3, 3.0], and the specific description is as follows:
[0163] Lower limit (0.3 - 0.8): Applicable to high-precision and strong timing-dependent tasks (such as precision assembly, synchronous control), achieving strict synchronization by narrowing the tolerance interval.
[0164] Intermediate value (0.8 - 1.5): Applicable to conventional machining tasks, balancing precision and system robustness, and avoiding excessive correction.
[0165] Upper limit (1.5 - 3.0): Applicable to low-beat tasks or transition stages, allowing larger deviations to improve system stability and reduce ineffective adjustments.
[0166] In summary, this setting method not only improves the adaptability of tolerance judgment but also enhances the universality of the system to various production conditions, ensuring the engineering feasibility of this method in the actual industrial environment.
[0167] The embodiment of the present invention also provides a multi-device collaborative control system for a digital workshop based on the Internet of Things. The system includes:
[0168] An acquisition module, configured to obtain the status information of the first device during the execution of the processing task to obtain the original status data. The status information includes a task identifier, the current process progress, and the running timestamp;
[0169] A status judgment module, configured to judge and process the original status data. When the process progress reaches a preset completion threshold or the running time exceeds a preset running time threshold, a status change event is generated. The status change event includes a target task identifier, an event trigger time, and the corresponding process number;
[0170] A pending scheduling event generation module, configured to construct an event queue according to the status change event, organize various status change events into the queue in chronological order, and generate a pending scheduling event stream;
[0171] A trigger instruction generation module, configured to identify the priority of the pending scheduling event stream based on the task identifier and the process dependency relationship, determine the target status change event associated with the second device, and generate trigger instruction data;
[0172] A recording module, configured to instruct the second device to execute the subsequent operation task according to the trigger instruction data, and calibrate the execution start time based on the trigger time, and generate an action record of the second device;
[0173] An adjustment instruction generation module is configured to match the second device action record with the target state change event, and compare its record time with the trigger time. If the time deviation exceeds the tolerance range, adjustment instruction data is generated.
[0174] An adjustment module is configured to gradually correct the control period of the second device in a manner of decreasing time deviation according to the adjustment instruction data, so that the time point of each execution response approaches the corresponding trigger time period by period, reducing the time difference between the two.
[0175] It should be noted that this system corresponds to the above method. All implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0176] An embodiment of the present invention also provides a computing device, including: a processor and a memory storing a computer program. When the computer program is run by the processor, the above-mentioned method is executed. All implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0177] An embodiment of the present invention also provides a computer-readable storage medium storing instructions. When the instructions are run on a computer, the computer is made to execute the above-mentioned method. All implementation manners in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0178] The above is the preferred implementation manner of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A multi-device collaborative control method for a digital workshop based on the Internet of Things, characterized in that, The method includes: Obtaining the status information of the first device during the execution of the processing task to obtain the original status data; Judging and processing the original status data, and generating a status change event when the process progress reaches the preset completion threshold or the running time exceeds the preset running time threshold; According to the status change event, constructing an event queue, organizing various status change events into the queue in chronological order, and generating a to-be-scheduled event stream; Based on the task identifier and the process dependency relationship, identifying the priority of the to-be-scheduled event stream, determining the target status change event associated with the second device, and generating trigger instruction data; According to the trigger instruction data, instructing the second device to execute the subsequent operation task, and calibrating the execution start time based on the trigger time to generate the action record of the second device; Matching the action record of the second device with the target status change event, and comparing the recorded time and the trigger time. If the time deviation exceeds the tolerance interval, generating adjustment instruction data; According to the adjustment instruction data, adopting a time deviation decreasing control method to gradually correct the control period of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, and narrowing the time difference between the two; According to the adjustment instruction data, adopting a time deviation decreasing control method to gradually correct the control period of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, and narrowing the time difference between the two, including: Constructing a time adjustment function based on the proportional control principle, where the time adjustment function takes the time deviation between the execution response time of the previous cycle and the current trigger time as the input and outputs a step correction value; Applying the step correction value to the control period setting value of the second device to generate a new cycle adjustment parameter, and loading this parameter into the local control module of the second device; Continuously monitoring the execution response time in the new cycle, and calculating the difference from the latest trigger time. If the time deviation exceeds the tolerance interval, continue to recursively calculate the step correction value of the next cycle based on the current deviation value; The modeling method of the current load status of the second device includes: Based on the running queue length, the average task execution time, and the resource occupancy rate index, comprehensively modeling the current load status of the second device to construct a load status evaluation function; Calculating the current load value according to the load status evaluation function; The setting mechanism of the tolerance interval includes: Based on the historical cycle data, obtaining the time deviation values between the execution response time of the second device and the corresponding trigger time in multiple consecutive cycles to obtain historical deviation data; Processing the time deviation values in the historical deviation data by using a weighted average method to calculate the average reference value of the current time deviation; According to the average reference value of the current time deviation, setting an expansion ratio parameter, and multiplying the average reference value by the expansion ratio parameter to obtain the upper and lower limits of the tolerance interval of the current cycle; Among them, the expansion ratio parameter can be preset or dynamically adjusted according to the type, accuracy level, or execution stage of the operation task.
2. The multi-device collaborative control method for a digital workshop based on the Internet of Things according to claim 1, wherein, Judge and process the original status data. When the process progress reaches the preset completion threshold or the running time exceeds the preset running time threshold, generate a status change event, including: Calculate the change rate between the current process progress and the process progress in the previous cycle, and judge whether the change rate meets the preset growth threshold; When the change rate meets the preset growth threshold, if the current process progress value is greater than or equal to the preset completion threshold, mark this moment as a candidate trigger time point; Judge whether the current running time exceeds the preset running time threshold. If any of the conditions is met, generate a status change event, and the status change event includes the target task identifier, the event trigger time, and the corresponding process number.
3. The multi-device collaborative control method for a digital workshop based on the Internet of Things according to claim 1, wherein Based on the task identifier and the process dependency relationship, identify the priority of the to-be-scheduled event stream, determine the target status change event associated with the second device, and generate trigger instruction data, including: Construct dependency relationship structure data with the task identifier as the node and the process dependency as the edge; According to the dependency relationship structure data, find the upstream nodes directly adjacent to the task identifier of the second device, and filter out the corresponding status change events from the to-be-scheduled event stream to generate to-be-sorted status change event data; Sort the status change events in the to-be-sorted status change event data based on the priority calculation function to generate numerical priority weight data, and the priority calculation function takes the event timestamp, the task urgency, and the current load status of the second device as input factors; According to the numerical priority weight data, select the status change event with the highest priority as the target event, and extract its task identifier, process number, and trigger time to form trigger instruction data.
4. The multi-device collaborative control method for a digital workshop based on the Internet of Things according to claim 2, wherein Calculate the change rate between the current process progress and the process progress in the previous cycle, and judge whether the change rate meets the preset growth threshold, including: Construct a process progress change rate function with the difference between the current cycle process progress value and the previous cycle process progress value as the numerator and the current cycle time interval as the denominator, and calculate the change rate value; Compare the change rate value with the preset growth threshold. If the change rate value is greater than or equal to the preset growth threshold in two consecutive cycles, it is judged that the progress is steadily rising, and the event trigger determination stage is allowed to enter; If the change rate value fluctuates greatly and exceeds the set fluctuation tolerance range, the generation of the status change event in this cycle is interrupted.
5. The multi-device collaborative control system for a digital workshop based on the Internet of Things, characterized in that, Applied to the method described in any one of claims 1 to 4, the system includes: An acquisition module for obtaining the status information of the first device during the execution of the processing task to obtain the original status data, and the status information includes the task identifier, the current process progress, and the running time stamp; A status judgment module for judging and processing the original status data. When the process progress reaches the preset completion threshold or the running time exceeds the preset running time threshold, generate a status change event, and the status change event includes the target task identifier, the event trigger time, and the corresponding process number; A to-be-scheduled event generation module for constructing an event queue according to the status change event, organizing various status change events into the queue in chronological order, and generating a to-be-scheduled event stream; A trigger instruction generation module, configured to identify the priority of the event stream to be scheduled based on the task identifier and the process dependency relationship, determine the target status change event associated with the second device, and generate trigger instruction data; A recording module, configured to, according to the trigger instruction data, instruct the second device to execute subsequent operation tasks, and calibrate the execution start time based on the trigger time to generate an action record of the second device; An adjustment instruction generation module, configured to match the action record of the second device with the target status change event, and compare its recorded time with the trigger time. If the time deviation exceeds the tolerance interval, adjustment instruction data is generated; An adjustment module, configured to, according to the adjustment instruction data, adopt a time deviation decreasing control method to gradually correct the control cycle of the second device, so that the time point of each execution response approaches the corresponding trigger time cycle by cycle, reducing the time difference between the two.
6. A computing device, characterized in that, Comprising: One or more processors; A storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, A program is stored in the computer-readable storage medium, and when the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Robot fleet management and additive manufacturing for value chain networks
AU2021401816A1
Intelligent manufacturing-oriented digital workshop production process management platform
CN119849878A
Cited By
Multi-device synchronous measurement cooperative control method and system
CN122110846A
A multi-device synchronous measurement collaborative control method and system
CN122110846B
Multi-device cooperative scheduling electric control system for textile manufacturing digital workshop
CN122632780A