Task scheduling method for distributed system of furniture production line

By adopting gateway cluster communication in the distributed system of the furniture production line, the problem of untimely and lost message transmission caused by gateway failure was solved, and timely communication and high-quality message transmission between devices were realized.

CN121008549AActive Publication Date: 2025-11-25NANXING MACHINERY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511267701.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-11-25
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

In existing distributed systems for furniture production lines, gateway outages lead to problems such as untimely message transmission and message loss.

Method used

Gateway cluster communication is adopted. The system obtains the online gateway with the smallest sequence number among the online gateways and re-obtains the new online gateway with the smallest sequence number when the device fails to connect, thus ensuring smooth communication between the device and the gateway.

Benefits of technology

It effectively avoids message transmission failures caused by gateway failures or disconnections, ensures timely message transmission between devices and prevents message loss, thereby improving communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121008549A_ABST
    Figure CN121008549A_ABST
Patent Text Reader

Abstract

The invention relates to the field of digital information transmission, in particular to a task scheduling method for a distributed system of a furniture production line, which comprises the following steps of: acquiring an online gateway with the smallest serial number in online gateways of a gateway cluster, and monitoring whether equipment is connected to the online gateway with the smallest serial number or not; in response to the fact that a certain device is not connected to the online gateway with the minimum serial number, disconnecting the gateway connected to the device at the current moment, connecting the gateway to the online gateway with the minimum serial number, and identifying whether the connection is successful; if the connection is successful, the task is made to enter a task waiting state, and the task is processed after being received; and if the connection is not successful, the new online gateway with the minimum serial number is obtained again, and connection between each production device, each central control device and the general control device and the new online gateway with the minimum serial number is carried out. By adopting the method provided by the invention, the messages can be timely transmitted among the devices of the distributed system of the furniture production line, and the messages are prevented from being lost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of digital information transmission. More particularly, the present application relates to a task scheduling method of a furniture production line distributed system. BACKGROUND

[0002] The furniture production line distributed system is a system that distributes the various links in the furniture manufacturing process (such as raw material processing, part machining, assembly, painting, packaging, etc.) through computer network and intelligent control technology for collaborative management and control. The system aims to improve production efficiency, flexibility and automation level, and adapt to the modern furniture production demand of customization, flexibility, multi-variety and small batch.

[0003] The existing furniture production line distributed system usually includes a master control device, a central control device and various production devices, wherein the master control device is used to monitor each central control device, and the central control device is used to monitor each corresponding production device. The master control device and the central control device are in communication connection, and the central control device and the production device are in communication connection. In the prior art, the devices in the furniture production line distributed system are usually connected in communication through a gateway. When scheduling the devices in the furniture production line distributed system, the master control device needs to issue tasks to the corresponding central control device and receive the topic message returned by the central control device, and the central control device needs to issue tasks to the corresponding production device and receive the topic message returned by the production device. However, the gateway may drop out during work, which may cause the messages between the devices to be unable to be transmitted in time and the phenomenon of message loss.

[0004] In summary, the existing task scheduling method of the furniture production line distributed system has the problems of untimely message transmission and message loss. SUMMARY

[0005] In order to solve the problem of untimely message transmission and message loss in the existing task scheduling method of the furniture production line distributed system, the present application provides a solution in the following aspects.

[0006] In a first aspect, the present application provides a task scheduling method of a furniture production line distributed system, the distributed system comprising a master control device connected to a plurality of central control devices, each central control device being connected to a plurality of production devices, the master control device being configured to issue production tasks to the central control devices and receive topic messages published by the central control devices, the central control device being configured to forward the production tasks issued by the master control device to the corresponding production devices and receive topic messages published by the corresponding production devices, the production device being configured to execute the production tasks issued by the master control device; the master control device and the central control device, and the central control device and the production device communicate through a gateway cluster, the method comprising: obtaining an online gateway with the smallest serial number in the gateway cluster, and monitoring whether each device is connected to the online gateway with the smallest serial number; the devices comprising each production device, each central control device, and the master control device. In response to a device not being connected to the online gateway with the smallest serial number, disconnecting the gateway to which the device is currently connected, and connecting the device to the online gateway with the smallest serial number, and identifying whether the connection is successful. If the connection is successful, the device enters a task waiting state, and processes the received task; if the connection is not successful, a new online gateway with the smallest serial number is obtained, and the connection between each production device, each central control device, and the master control device and the new online gateway with the smallest serial number is established, the task comprising a publishing task and a receiving task.

[0007] The method has the beneficial effects that: the method of the present application uses redundant gateway settings (i.e. sets up a gateway cluster, and keeps multiple gateways online), and when the currently used gateway goes offline, a standby gateway is used for message transmission, which can avoid the problem of message transmission failure caused by gateway failure or going offline; when a device is connected to the online gateway with the smallest serial number, if the connection is not successful, it is likely that the online gateway with the smallest serial number has gone offline. The task scheduling method of the furniture production line distributed system of the present embodiment can timely connect each device to a new gateway when the online gateway with the smallest serial number goes offline, thereby ensuring that each device can timely transmit messages, preventing message loss, and improving the communication quality of the furniture production line distributed system.

[0008] Preferably, the method further comprises: in response to the device being in the task waiting state for a time period exceeding a first time period threshold, re-obtaining the online gateway with the smallest serial number, and re-establishing the connection between the device and the online gateway with the smallest serial number.

[0009] The beneficial effect is that if the device is waiting for a task and the waiting time is exceeded, it is likely that the gateway connected by the device has been disconnected, and by reacquiring the gateway with the smallest serial number online and reestablishing the connection between the device and the gateway, the timeliness of message transmission between devices can be further ensured, and message loss can be prevented.

[0010] Preferably, the method further comprises monitoring whether each production device, each central control device and the general control device execute the published task in real time. In response to a device completing the execution of the published task, the gateway with the smallest serial number online is reacquired. In response to a change in the gateway with the smallest serial number online, the connection between each device and the gateway with the smallest serial number online is reestablished.

[0011] The beneficial effect is that as time goes on, the gateway connected by the device may be disconnected, and by detecting whether the gateway with the smallest serial number online changes after the device completes the execution of the published task and reestablishing the connection between the device and the gateway under the condition of a change, the problem of the disconnection of the previously connected gateway causing the failure of the device to execute the task next time can be prevented, the timeliness of message transmission between devices can be further ensured, and message loss can be prevented.

[0012] Preferably, the topic message published by the production device includes the state of task execution and the running state of the production device itself, and the topic message published by the central control device includes the running state and the task execution state of each corresponding production device.

[0013] Preferably, the method further comprises: acquiring the number of production orders; In response to the number of production orders being less than a first preset threshold, the first preset number of central control devices and corresponding production devices are disabled by the general control device.

[0014] The beneficial effect is that if the number of orders is small, many machines and workstations are not saturated in workload, and by disabling a part of the central control devices and corresponding production devices, the cost of order production can be saved.

[0015] Preferably, the online gateways of the gateway cluster are enabled one by one according to the same enabling method when they are initially enabled, and for a gateway, the enabling method comprises: broadcasting the ID of the gateway and listening to the online gateways to acquire the maximum serial number of the online gateways; taking the sum of the maximum serial number and a preset value as the serial number of the gateway, and controlling the gateway to enter a working state.

[0016] Preferably, the central control device is further connected to a plurality of workpiece layout servers to publish a task subject message to the workpiece layout servers and receive a message returned by the workpiece layout servers, and the method further comprises: in response to the number of production orders being less than a first preset threshold, disabling a second preset number of workpiece layout servers by the total control device.

[0017] Preferably, the method further comprises: The central control device acquires the working state of the online workpiece layout servers to identify whether there is a workpiece layout server in an idle state; and receives a first task subject message published by the total control device in real time; In response to there being a workpiece layout server in an idle state and the central control device receiving the first task subject message published by the total control device, the central control device publishes the first task subject message to the workpiece layout server and enters a state of waiting for a return message; the return message refers to a message returned by the workpiece layout server after processing a task corresponding to the first task subject message; In response to the time length of the central control device being in the state of waiting for processing a return message exceeding a second time length threshold, re-identifying a workpiece layout server in an idle state, publishing a task subject message to the workpiece layout server and re-entering the state of waiting for processing a return message.

[0018] Preferably, the method further comprises: in response to the central control device receiving the return message within the second time length threshold, returning a first message to the total control device, the first message including the scheduling situation and the layout task completion situation.

[0019] Preferably, the method further comprises: simultaneously starting the programs of two gateways on the server of the gateway, and causing the two gateways to watch each other, and when it is detected that one of the gateways has no heartbeat, the other gateway restarts the one gateway. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which a number of embodiments of the application are illustrated by way of example and not limitation. Like or corresponding reference numerals are used to indicate like or corresponding parts throughout the several views of the drawings, and in which: Figure 1 is a schematic view showing the composition structure of a furniture production line distributed system according to an embodiment of the present application; Figure 2 is a flowchart showing a task scheduling method of a furniture production line distributed system according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0022] Task scheduling method of furniture production line distributed system embodiment: As Figure 1 The furniture production line distributed system based on which the task scheduling method of the furniture production line distributed system of the present application is shown in the figure, and comprises a master control device connected to multiple central control devices, each of which is connected to multiple production devices, the master control device is used to issue production tasks to the central control devices and receive topic messages published by the central control devices, the central control device is used to forward the production tasks issued by the master control device to the corresponding production devices and receive the topic messages published by the corresponding production devices, and the production device is used to execute the production tasks issued by the master control device; the master control device and the central control device, and the central control device and the production device are all communicated through a gateway cluster.

[0023] In this embodiment, the central control device can include multiple types, such as a drilling workstation central control device, a sorting central control device, and an edge banding machine connection central control device, etc. The types of production devices are also various, such as a sleeve cutting machine device, a drilling center device, a computer saw, and an edge banding machine.

[0024] As Figure 2 The task scheduling method of the furniture production line distributed system of the present application comprises: S101, obtaining the online gateway with the smallest serial number and monitoring the connection status of each device, specifically: obtaining the online gateway with the smallest serial number in the gateway cluster, and monitoring whether each device is connected to the online gateway with the smallest serial number; the devices include each production device, each central control device, and the master control device; S102, connecting each device to the online gateway with the smallest serial number, specifically: in response to a device not being connected to the online gateway with the smallest serial number, disconnecting the gateway connected at the current time, connecting it to the online gateway with the smallest serial number, and identifying whether the connection is successful; S103, controlling the device to enter a task waiting state or reconnecting the gateway, specifically: if the connection is successful, the device enters a task waiting state and processes the task after receiving it; if the connection is not successful, the online gateway with the smallest serial number is reacquired, and the connection between each device and the online gateway with the smallest serial number is established, the task includes a publishing task and a receiving task.

[0025] In this embodiment, the publishing task of the production device includes publishing a topic message, and the receiving task includes receiving the production task issued by the corresponding central control device. The topic message published by the production device includes the state of task execution and the running state of the production device itself.

[0026] If a piece of equipment in the furniture production line distributed system is broken, the system is broken, or the software is problematic, the direct manifestation is that the broadcast of the equipment is not received through the gateway, and the central control device will not allocate tasks to the equipment. Similarly, if the central control device is offline, the master control device will not allocate tasks to the central control device.

[0027] The publishing task of the central control device includes publishing a topic message, and the topic message published by the central control device includes the running state and the task execution state of each production equipment. The task execution state includes three states of unexecuted, executing, and executed. The receiving task of the central control device includes receiving the production task issued by the master control device and the topic message published by the production equipment.

[0028] The publishing task of the master control device includes publishing a topic message, and the topic message published by the master control device includes the production task. The receiving task of the master control device includes receiving the topic message published by the central control device.

[0029] In this embodiment, the gateway uses the MQTT protocol interaction format. The MQTT protocol is a lightweight message transmission protocol based on the publish / subscribe mode, designed for resource-constrained devices and low-bandwidth, unreliable network environments, and widely used in the fields of Internet of Things (IoT), smart home, industrial automation, etc.

[0030] The method of this embodiment can avoid the problem that the message cannot be transmitted due to the gateway failure or disconnection by enabling the standby gateway to transmit the message when the currently used gateway is disconnected, by setting the redundancy of the gateway (i.e. setting the gateway cluster and keeping multiple gateways online). When connecting a device to the online gateway with the smallest serial number, if the connection is unsuccessful, it is likely that the online gateway with the smallest serial number has disconnected. The task scheduling method of the furniture production line distributed system of this embodiment can reacquire the online gateway with the smallest serial number and re-connect the device and the online gateway with the smallest serial number when the connection is unsuccessful, so that the devices can be connected to the new gateway in time when the online gateway with the smallest serial number is disconnected, thereby ensuring that the messages can be transmitted in time between the devices, preventing the loss of messages, and improving the communication quality of the furniture production line distributed system.

[0031] In one embodiment, the method further includes: in response to the length of time that the device is in the task waiting state exceeding the first time threshold, reacquiring the online gateway with the smallest serial number and re-connecting the devices and the online gateway with the smallest serial number.

[0032] If the device is waiting for a task and the waiting time is exceeded, it is likely that the gateway connected by the device has been disconnected. By reacquiring the gateway with the smallest serial number online and reestablishing the connection between the device and the gateway, the timeliness of message transmission between devices can be further ensured, and message loss can be prevented.

[0033] In one embodiment, the method further comprises: S201, monitoring whether each device executes a publishing task in real time; S202, in response to a device completing a publishing task, reacquiring the gateway with the smallest serial number online; S203, in response to a change in the gateway with the smallest serial number online, reestablishing the connection between each device and the gateway with the smallest serial number online.

[0034] Since the gateway connected by the device may be disconnected over time, detecting whether the gateway with the smallest serial number online changes after the device completes a publishing task and reestablishing the connection between the device and the gateway under the condition of a change can prevent the problem of the previously connected gateway being disconnected, causing the device to fail to execute a task the next time, further ensuring the timeliness of message transmission between devices, and preventing message loss.

[0035] In one embodiment, the method further comprises: S301, acquiring the number of production orders; S302, in response to the number of production orders being less than a first preset threshold, disabling the first preset number of central control devices and corresponding production devices by the total control device.

[0036] When there are many production orders, many central control devices and production devices are enabled, and the total control device will automatically schedule these central control devices to allocate tasks, and the central control device allocates tasks to single devices. If there are few customer orders, many machines and workstations are not saturated in workload, and by disabling a part of the central control devices and corresponding production devices, the cost of order production can be saved.

[0037] In one embodiment, the online gateways of the gateway cluster are enabled one by one according to the same enabling method when they are initially enabled. For a certain gateway, the enabling method comprises: S401, broadcasting the ID of the gateway, and listening to the online gateways to acquire the maximum serial number of the online gateways; S402, taking the sum of the maximum serial number and a preset value as the serial number of the gateway, and controlling the gateway to enter a working state.

[0038] In this embodiment, the preset value can be set to 1, and in other embodiments, it can also be set to other appropriate values.

[0039] The gateway enabling method of the embodiment can ensure that the serial numbers of the online gateways of the gateway cluster are different.

[0040] In one embodiment, the central control device is further connected to a plurality of workpiece layout servers to publish a task topic message to the workpiece layout servers and receive a message returned by the workpiece layout servers, and the method further comprises: in response to the number of production orders being less than a first preset threshold, disabling a second preset number of workpiece layout servers by the total control device.

[0041] The workpiece layout server refers to a computing system for reasonably arranging a plurality of workpieces to be processed on a material (such as a steel plate, a wooden board, glass, cloth, etc.) to minimize material loss.

[0042] When the number of production orders is small, only a small number of workpiece layout servers are enabled; and when the number of production orders is large, a large number of workpiece layout servers are enabled; thus, cost can be saved.

[0043] In one embodiment, the method further comprises: S501, the central control device acquires the working state of the online workpiece layout servers to identify whether there is a workpiece layout server in an idle state; and the central control device receives a first task topic message published by the total control device in real time; In the embodiment, the way of judging whether the workpiece layout server is in an idle state is: acquiring the CPU occupancy rate of the workpiece layout server, and determining that the workpiece layout server is in an idle state when the CPU occupancy rate is lower than an occupancy rate threshold. In the embodiment, the occupancy rate threshold can be set to 80%, and in other embodiments, it can also be set to other appropriate values.

[0044] S502, in response to there being a workpiece layout server in an idle state and the central control device receiving the first task topic message published by the total control device, the central control device publishes the first task topic message to the workpiece layout server, and enters a state of waiting for a return message; the return message refers to a message returned by the workpiece layout server after processing a task corresponding to the first task topic message; S503, in response to the time length of the central control device being in the state of waiting for processing a return message exceeding a second time length threshold, re-identifying a workpiece layout server in an idle state, publishing the first task topic message to the workpiece layout server, and re-entering the state of waiting for processing a return message.

[0045] If the task amount of some workpiece layout servers is too large, and some other workpiece layout servers are relatively idle, it will lead to a low layout efficiency. By causing the central control device to publish a layout task only to a workpiece layout server in an idle state, the amount of layout tasks processed by each workpiece layout server is balanced, and the efficiency of workpiece layout can be improved.

[0046] From the above embodiment, the central control device needs to forward the first task theme message issued by the general control device to the workpiece layout server in the idle state after receiving it. Since the furniture production line distributed system includes multiple central control devices, when performing the workpiece layout task, the general control device only needs to call one of the central control devices. In an embodiment, the general control device issues the first task theme message in the following manner: obtaining the working states of all online central control devices to obtain the idleness of each online central control device, and issuing the first task theme message to the online central control device with the highest idleness.

[0047] The idleness of the central control device can be measured according to the CPU occupancy rate of the central control device. The higher the CPU occupancy rate, the lower the idleness.

[0048] If the first task theme message is sent to a relatively busy central control device, it may lead to that the first task theme message is not processed in time. By causing the general control device to issue the first task theme message to the online central control device with the highest idleness, the task processing efficiency of the furniture production line distributed system can be improved.

[0049] In an embodiment, the method further includes: in response to the central control device receiving the return message within a second time length threshold, returning a first message to the general control device, the first message including the scheduling situation and the layout task completion situation.

[0050] In an embodiment, the method further includes: simultaneously starting the programs of two gateways on the server of the gateway, and causing the two gateways to watch each other, and when it is detected that one of the gateways has no heartbeat, the other gateway restarts it.

[0051] By causing the two gateways to watch each other, the offline gateway can be restarted in time in the case of gateway offline, and the normal information interaction between the central control device, the general control device and the production equipment is ensured.

[0052] In the description of the present specification, the meaning of "multiple" and "several" is at least two, for example, two, three or more, etc., unless otherwise explicitly specified.

[0053] Although the present specification has shown and described several embodiments of the present application, it will be apparent to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, changes and alternatives without departing from the idea and spirit of the present application. It should be understood that various alternatives to the embodiments of the present application described herein can be employed in practicing the present application.

Claims

1. A task scheduling method for a furniture production line distributed system, characterized in that, The distributed system comprises a master control device connected to multiple central control devices, each of which is connected to multiple production devices, the master control device is configured to issue production tasks to the central control devices and receive topic messages published by the central control devices, the central control device is configured to forward the production tasks issued by the master control device to the corresponding production devices and receive topic messages published by the corresponding production devices, and the production device is configured to execute the production tasks issued by the master control device; The master control device and the central control device, and the central control device and the production device, communicate through a gateway cluster, and the method comprises: obtaining an online gateway with the smallest serial number in the gateway cluster, and monitoring whether each device is connected to the online gateway with the smallest serial number; the devices comprise the production devices, the central control devices, and the master control device; In response to a device not being connected to the online gateway with the smallest serial number, the device is disconnected from the currently connected gateway and connected to the online gateway with the smallest serial number, and it is determined whether the connection is successful; If the connection is successful, the device enters a task waiting state, and processes the received task; if the connection is not successful, a new online gateway with the smallest serial number is obtained, and the production devices, the central control devices, and the master control device are connected to the new online gateway with the smallest serial number, and the tasks comprise publishing tasks and receiving tasks.

2. The method of claim 1, wherein, The method further comprises: In response to the device being in the task waiting state for a duration longer than a first duration threshold, the online gateway with the smallest serial number is re-obtained, and the connection between the device and the online gateway with the smallest serial number is re-established.

3. The method of claim 2, wherein, The method further comprises: Real-time monitoring of whether the production devices, the central control devices, and the master control device execute the published tasks; In response to a device completing the execution of the published tasks, the online gateway with the smallest serial number is re-obtained; In response to the online gateway with the smallest serial number changing, the connection between each device and the online gateway with the smallest serial number is re-established.

4. The method of claim 1, wherein, The topic messages published by the production devices comprise the status of task execution and the running status of the production devices themselves, and the topic messages published by the central control devices comprise the running status and the task execution status of the corresponding production devices.

5. The method of claim 1, wherein, The method further comprises: Obtaining the number of production orders; In response to the number of production orders being less than a first preset threshold, the master control device is configured to disable a first preset number of central control devices and corresponding production devices.

6. The method of claim 1, wherein, The online gateways of the gateway cluster are enabled one by one according to the same enabling method when they are initially enabled, and the enabling method for a gateway comprises: Broadcasting the ID of the gateway, and listening to the online gateways to obtain the maximum serial number of the online gateways; Taking the sum of the maximum serial number and a preset value as the serial number of the gateway, and controlling the gateway to enter a working state.

7. The method of claim 1 to 6, wherein, The central control device is further connected to multiple workpiece layout servers to publish task topic messages to the workpiece layout servers and receive messages returned by the workpiece layout servers, and the method further comprises: in response to the number of production orders being less than a first preset threshold, the master control device is configured to disable a second preset number of workpiece layout servers.

8. The method of claim 7, wherein the task scheduling is performed by the task scheduler of the furniture production line distributed system. The method further comprises: The central control device acquires the working state of the online workpiece layout server to identify whether there is an idle workpiece layout server; and receives the first task theme message published by the general control device in real time; In response to the existence of the idle workpiece layout server and the central control device receiving the first task theme message published by the general control device, the central control device publishes the first task theme message to the workpiece layout server, and enters a state of waiting for a return message; the return message refers to a message returned by the workpiece layout server after processing a task corresponding to the first task theme message; In response to the time length of the central control device in the state of waiting for processing the return message exceeding a second time length threshold, the idle workpiece layout server is re-identified, the task theme message is published to the workpiece layout server, and the state of waiting for processing the return message is re-entered.

9. The method of claim 8, wherein, The method further includes: in response to the central control device receiving the return message within the second time length threshold, returning a first message to the general control device, the first message including the scheduling situation and the layout task completion situation.

10. The method of claim 1, wherein, The method further includes: simultaneously starting the programs of two gateways on the server of the gateway, and causing the two gateways to watch each other, and when it is detected that one of the gateways has no heartbeat, the other gateway restarts the one gateway.

Citation Information

Patent Citations

  • Cloud communication based collection front-end system

    CN108011915A

  • Distributed file storage system and file storage method

    CN110351119A

  • Data processing system for processing mass data and processing method thereof

    CN119473586A

  • Multi-functional unmanned ship cluster control method and system oriented to gridding deployment

    CN120456353A

  • Message queues for rapid re-hosting of client devices

    US10686747B1