Embroidery machine embroidery path correction method and control method, system
By maintaining absolute coordinate reference coordinate data on the edge computing gateway and combining it with relative coordinate data to correct the embroidery path of the embroidery machine, the problem of coordinate offset in remote control of the embroidery machine is solved, and the yield of the embroidery machine is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN SIJIU TECH CO LTD
- Filing Date
- 2026-03-13
- Publication Date
- 2026-07-03
AI Technical Summary
In the process of remote control of existing embroidery machines, permanent offsets occur when relative coordinates are updated due to lost data packets or data jumps, which affects the yield rate.
The baseline coordinate data of absolute coordinates is maintained on the edge computing gateway. The relative coordinate data is processed through the first-level verification to generate the target coordinate data. The baseline coordinate data is updated in combination with the target coordinate data, and a second control command is generated and sent to the embroidery machine to correct the embroidery path.
This improves the accuracy and yield of remote control of embroidery machines and avoids coordinate offset problems caused by relative coordinate control.
Smart Images

Figure CN122327480A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of embroidery machine technology, and in particular to an embroidery path correction method and control method and system for embroidery machines. Background Technology
[0002] In related technologies, embroidery machines determine coordinate data based on received control commands, and then determine the embroidery coordinates and path according to the coordinate data, thereby achieving remote-controlled embroidery. However, currently, control commands indicating coordinate data are generally sent by issuing relative coordinates to control the embroidery machine. If data packets are lost during communication, or if data jumps occur, the subsequent embroidery coordinates updated based on relative coordinates will be permanently offset, resulting in defective products and affecting the yield of embroidery.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0004] The main objective of this application is to propose a method and control system for correcting embroidery paths on an embroidery machine, which aims to improve the accuracy of remote control of the embroidery machine and increase its production yield.
[0005] To achieve the above objectives, one aspect of this application proposes an embroidery path control method for an embroidery machine, the method being applied to an edge computing gateway, the method comprising: In response to receiving a first control command, perform a first-level verification on the first control command; When the verification result of the first level is passed, the relative coordinate data is determined according to the first control command; Obtain reference coordinate data, determine target coordinate data based on the reference coordinate data and the relative coordinate data, and update the reference coordinate data based on the target coordinate data, wherein both the reference coordinate data and the target coordinate data are data described in absolute coordinates; A second control command is generated based on the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and the relative coordinate data.
[0006] In some embodiments, after updating the reference coordinate data according to the target coordinate data, the method further includes: Determine whether the correction conditions are met; When the correction conditions are met, the second control command is generated based on the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine. When the correction conditions are not met, a third control command is generated based on the relative coordinate data and sent to the embroidery machine. The third control command is used to instruct the embroidery machine to determine the embroidery path based on the relative coordinate data.
[0007] In some embodiments, determining whether the correction condition is met includes: The cumulative number of actions is obtained. When the cumulative number of actions reaches a first preset number, it is determined that the correction condition is met. The cumulative number of actions is incremented when the third control command is sent and reset when the second control command is sent. Alternatively, in response to determining that a color-changing event is triggered according to the first control instruction, it is determined that the correction condition is met; Alternatively, embroidery pattern data can be obtained, and expected coordinate data can be determined based on the embroidery pattern data; when the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, it is determined that the correction condition is met.
[0008] In some embodiments, performing a first-level verification on the first control command includes: The first control command is subjected to at least one of the following checks: serial number continuity check, header integrity check, length validity check, and direction validity check.
[0009] In some embodiments, the method further includes: Acquire historical coordinate data within a target time period, wherein the historical coordinate data includes the reference coordinate data corresponding to a second preset number of consecutive embroidery actions within the target time period; The historical coordinate data is subjected to a second level of verification; When the verification result of the second-level verification is unsuccessful, a stop command is sent to the embroidery machine, and the embroidery path control process is interrupted.
[0010] In some embodiments, the second-level verification of the historical coordinate data includes: The historical coordinate data shall be subjected to at least one of the following checks: cyclic redundancy check, physical rationality check, and trajectory continuity check.
[0011] In some embodiments, the reference coordinate data includes reference x-axis coordinates and reference y-axis coordinates, and the relative coordinate data includes x-axis increment coordinates and y-axis increment coordinates. Determining the target coordinate data based on the reference coordinate data and the relative coordinate data includes: The target x-axis coordinates are determined based on the reference x-axis coordinates and the incremental x-axis coordinates. The target y-axis coordinate is determined based on the reference y-axis coordinate and the incremental y-axis coordinate, wherein the target coordinate data includes the target x-axis coordinate and the target y-axis coordinate.
[0012] To achieve the above objectives, another aspect of this application proposes an embroidery path correction method for an embroidery machine. The method is applied to an embroidery machine and includes: In response to receiving a second control command, target coordinate data is determined according to the second control command; wherein, the second control command is an edge computing gateway responding to a first control command, performing a first-level verification on the first control command, and when the verification result of the first-level verification is passed, relative coordinate data is determined according to the first control command, target coordinate data is determined according to the reference coordinate data and the relative coordinate data, and generated according to the target coordinate data and the relative coordinate data; Obtain the embroidery pattern data, and determine the expected coordinate data based on the embroidery pattern data; When the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, a reset operation is performed.
[0013] In some embodiments, performing the reset operation includes: Determine the preset reset coordinates of the current working area based on the expected coordinate data; The control needle bar state is reset, and the current working coordinates are reset according to the preset reset coordinates; Update the current working coordinates based on the expected coordinate data.
[0014] To achieve the above objectives, another aspect of this application proposes an embroidery path control system for an embroidery machine, the system comprising: The first verification module is used to respond to the receipt of the first control command and perform a first-level verification on the first control command; when the verification result of the first-level verification is passed, the relative coordinate data is determined according to the first control command. A coordinate processing module is used to acquire reference coordinate data, determine target coordinate data based on the reference coordinate data and the relative coordinate data, and update the reference coordinate data based on the target coordinate data, wherein the reference coordinate data and the target coordinate data are both data described in absolute coordinates; The control module is used to generate a second control command based on the target coordinate data and the relative coordinate data, and to send the second control command to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and the relative coordinate data. The execution module is used to respond to receiving a second control command, determine target coordinate data according to the second control command; acquire embroidery pattern data, and determine expected coordinate data according to the embroidery pattern data; and perform a reset operation when the deviation between the target coordinate data and the expected coordinate data is greater than a deviation threshold.
[0015] The embodiments of this application include at least the following beneficial effects: This application provides an embroidery path correction method and control method and system for an embroidery machine. This solution is applied to an edge computing gateway. When a first control command is received, the system responds to the command to perform a first-level verification. When the verification result is passed, the system determines the relative coordinate data indicating the change of the embroidery path according to the first control command. Then, it obtains the reference coordinate data representing the absolute coordinates. The system determines the target coordinate data according to the reference coordinate data and the relative coordinate data. The reference coordinate data is updated with the target coordinate data to maintain the absolute coordinates. Then, a second control command is generated according to the target coordinate data and the relative coordinate data. The second control command is sent to the embroidery machine so that the embroidery machine corrects its embroidery path according to the relative coordinate data in the second control command and the target coordinate data representing the absolute coordinates. Compared to controlling the embroidery machine by issuing relative coordinates, the solution in this application maintains a reference coordinate data described in absolute coordinates on the edge computing gateway. Based on this reference coordinate data, the target coordinate data described in absolute coordinates can be updated synchronously when relative coordinate data is received. The target coordinate data is then combined with the target coordinate data to instruct the embroidery machine to correct its embroidery path, avoiding the problem of coordinate offset caused by controlling only relative coordinates. This improves the accuracy of remote control of the embroidery machine and increases the yield of finished products produced by the embroidery machine. Attached Figure Description
[0016] Figure 1 This is a flowchart of an embroidery path control method for an embroidery machine provided in an embodiment of this application; Figure 2 yes Figure 1 Partial flowchart of step S103; Figure 3 yes Figure 1 A flowchart of an embodiment following step S103; Figure 4 yes Figure 3 Flowchart of step S301; Figure 5 This is a flowchart of another embodiment of the embroidery path control method for an embroidery machine provided in this application; Figure 6 This is a flowchart of an embroidery path correction method for an embroidery machine provided in an embodiment of this application; Figure 7 yes Figure 3 Partial flowchart of step S603; Figure 8 This is a schematic diagram of the embroidery path control system for an embroidery machine provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0018] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0019] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] In related technologies, embroidery machines determine coordinate data based on received control commands, and then determine the embroidery coordinates and path according to the coordinate data, thereby achieving remote-controlled embroidery. However, currently, control commands indicating coordinate data are generally sent by issuing relative coordinates to control the embroidery machine. If data packets are lost during communication, or if data jumps occur, the subsequent embroidery coordinates updated based on relative coordinates will be permanently offset, resulting in defective products and affecting the yield of embroidery.
[0022] In view of this, this application provides an embroidery path correction method and control method / system for an embroidery machine. This solution is applied to an edge computing gateway. Upon receiving a first control command, the system responds to the command to perform a first-level verification. When the verification result is passed, the system determines the relative coordinate data indicating the change in the embroidery path according to the first control command. Then, it obtains the reference coordinate data representing the absolute coordinates. Based on the reference coordinate data and the relative coordinate data, the system determines the target coordinate data and updates the reference coordinate data with the target coordinate data to maintain the absolute coordinates. Subsequently, a second control command is generated based on the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine so that the embroidery machine corrects its embroidery path according to the relative coordinate data in the second control command and the target coordinate data representing the absolute coordinates. Compared to controlling the embroidery machine by issuing relative coordinates, the solution in this application maintains a reference coordinate data described in absolute coordinates on the edge computing gateway. Based on this reference coordinate data, the target coordinate data described in absolute coordinates can be updated synchronously when relative coordinate data is received. The target coordinate data is then combined with the target coordinate data to instruct the embroidery machine to correct its embroidery path, avoiding the problem of coordinate offset caused by controlling only relative coordinates. This improves the accuracy of remote control of the embroidery machine and increases the yield of finished products produced by the embroidery machine.
[0023] Figure 1 This is an optional flowchart of the embroidery path control method for an embroidery machine provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.
[0024] Step S101: In response to receiving the first control command, perform a first-level verification on the first control command; In this application, the automation of embroidery machines is achieved through remote control. Specifically, the production-related equipment includes a control terminal, an edge computing gateway, and embroidery machines. The control terminal can connect to multiple edge computing gateways, and each edge computing gateway can connect to multiple embroidery machines, thereby enabling remote control of multiple production lines. The control terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle-mounted terminal, but is not limited to these. The control terminal can also connect to multiple edge computing gateways via a server. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The control terminal should support human-machine interaction functions, enabling workers to configure or start the automated workflow of the embroidery machines through these functions.
[0025] After the automated workflow is initiated, the control terminal generates a first control command based on the embroidery pattern data. This embroidery pattern data serves as the specific reference data for the current embroidery product. The first control command includes at least relative coordinate data instructing the embroidery machine on how to change its working coordinates, as well as other event data related to the embroidery process. To send the control command to the embroidery machine, the first control command is relayed to an edge computing gateway. This embodiment utilizes an edge computing gateway to correct the embroidery path of the embroidery machine within the automated workflow.
[0026] When the edge computing gateway receives the first control command from the control terminal, it first performs a first-level verification on the command. This first-level verification is mainly used to determine whether there is a communication failure between the edge computing gateway and the control terminal, confirm the integrity of the communication information transmission, and avoid problems such as data packet loss. Therefore, the first-level verification only performs preliminary checks, such as checking the continuity of the sequence number; at the same time, the first-level verification also needs to control the communication delay caused by the verification to not exceed a first delay threshold, for example, not exceeding [a certain threshold]. or wait.
[0027] In some embodiments, performing a first-level verification on the first control command includes: The first control command is subjected to at least one of the following checks: serial number continuity check, header integrity check, length validity check, and direction validity check.
[0028] Specifically, the first-level verification may include at least one of the following: sequence number continuity verification, header integrity verification, length validity verification, and direction validity verification. Sequence number continuity verification checks whether the uniquely assigned incrementing or cyclic sequence number of the data packet is normal, confirming that the sequence is continuous, without repetition, jumps, or out of order. Header integrity verification checks whether the format, identifiers, fields, and length of the data packet header conform to the protocol, determining that the header information is usable. Length validity verification checks whether the total data length of the data packet header and body is within the legal range stipulated in the protocol and is consistent with the length declared in the header. Direction validity verification checks whether the sender, receiver, and packet type of the data packet conform to the transmission direction stipulated in the protocol. All four verification methods can be used to quickly troubleshoot communication problems between the control terminal and the edge computing gateway, thereby improving the reliability of the first control command transmission and the reliability of remote control of the embroidery machine.
[0029] Step S102: When the verification result of the first-level verification is passed, the relative coordinate data is determined according to the first control command; For the verification result of the first level, if the verification result is "failed", it means that there is a communication failure between the control terminal and the edge computing gateway, and there are problems such as data packet loss. It is necessary to request the control terminal to resend the first control command. If the verification result is "passed", the relative coordinate data is extracted from the first control command and used to assist in the verification of the embroidery path.
[0030] Step S103: Obtain reference coordinate data, determine target coordinate data based on reference coordinate data and relative coordinate data, and update reference coordinate data based on target coordinate data. Both reference coordinate data and target coordinate data are data described in absolute coordinates. In this embodiment, the edge computing gateway locally maintains coordinate data describing absolute coordinates, defined as reference coordinate data. Whenever an automated workflow is started, this reference coordinate data is reset to its original coordinates, such as (0,0), and then continuously updated based on the relative coordinate data in the current automated workflow. Essentially, while the embroidery machine changes its working coordinates according to the relative coordinate data, the edge computing gateway also records the absolute coordinates corresponding to the working coordinates by setting a reference coordinate data.
[0031] Furthermore, each first control command is defined to correspond to one embroidery action. After extracting the relative coordinate data from the first control command, the locally stored reference coordinate data is obtained. At this point, the reference coordinate data is the working coordinate of the previous embroidery action. The target coordinate data is calculated and determined based on the relative coordinate data and the reference coordinate data. This target coordinate data is the working coordinate of the current embroidery action. Then, the reference coordinate data of the previous embroidery action is overwritten and updated based on the target coordinate data.
[0032] refer to Figure 2 In some embodiments, step S103, which determines the target coordinate data based on the reference coordinate data and the relative coordinate data, includes: Step S201: Determine the target x-axis coordinates based on the reference x-axis coordinates and the x-axis incremental coordinates; Step S202: Determine the target y-axis coordinates based on the reference y-axis coordinates and the incremental y-axis coordinates. The target coordinate data includes the target x-axis coordinates and the target y-axis coordinates.
[0033] Optionally, in this embodiment, the embroidery product produced by the embroidery machine is planar embroidery, therefore its working coordinates can be described using a coordinate system including the x-axis and y-axis. The reference coordinate data includes reference x-axis coordinates and reference y-axis coordinates; similarly, the relative coordinate data includes x-axis increment coordinates and y-axis increment coordinates. The target x-axis coordinate can be obtained by calculating the sum of the reference x-axis coordinates and the x-axis increment coordinates; the target y-axis coordinate can be obtained by calculating the sum of the reference y-axis coordinates and the y-axis increment coordinates. Thus, target coordinate data including the target x-axis coordinates and the target y-axis coordinates are obtained, thereby supporting the recording of the embroidery machine's working coordinates in absolute coordinates and supporting subsequent steps in correcting its embroidery path.
[0034] In other embodiments, for embroidery products produced by embroidery machines, including curved surface embroidery and other scenarios, a matching coordinate system can be selected accordingly to obtain relative coordinate data described by relative coordinates, and reference coordinate data and target coordinate data described by absolute coordinates.
[0035] Step S104: Generate a second control command based on the target coordinate data and relative coordinate data, and send the second control command to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and relative coordinate data.
[0036] After obtaining the target coordinate data, a second control command is regenerated based on the target coordinate data and relative coordinate data, and then sent to the corresponding embroidery machine. Essentially, this involves adding the target coordinate data representing the absolute coordinates, along with control information to instruct the embroidery machine to perform a correction and reset, to the relative coordinate data that would normally be sent to the embroidery machine. This achieves control and correction of the embroidery path on the embroidery machine.
[0037] refer to Figure 3 In some embodiments, after step S103, the following steps are also included: Step S301: Determine whether the calibration conditions are met; Step S302: When the correction conditions are met, execute the second control command generated based on the target coordinate data and relative coordinate data, and send the second control command to the embroidery machine; Step S303: When the correction conditions are not met, a third control command is generated based on the relative coordinate data and sent to the embroidery machine. The third control command is used to instruct the embroidery machine to determine the embroidery path based on the relative coordinate data.
[0038] Figure 3 Steps S302 and S303 are parallel steps.
[0039] In this application, correcting the embroidery path of the embroidery machine involves resetting its needle bar movement and working coordinates. In an automated workflow, requiring the embroidery machine to be corrected and reset for each embroidery action would negatively impact production efficiency. Therefore, correction conditions are set, and the decision to control the embroidery machine for correction is made by first determining whether these conditions are met.
[0040] It should be noted that regardless of whether the correction conditions are met, it does not affect the edge computing gateway's ability to continue maintaining and updating the recorded reference coordinate data based on the reference coordinate data and relative coordinate data of the previous embroidery action in step S103.
[0041] When the calibration conditions are met, step S104 is executed, sending a second control command to the embroidery machine, including target coordinate data, relative coordinate data, and control information instructing the embroidery machine to perform calibration and reset. When the calibration conditions are not met, it means that the embroidery machine should maintain normal operation and only needs to focus on performing the current embroidery action. Therefore, a third control command is generated based on the relative coordinate data and sent to the embroidery machine, so that the embroidery machine updates its working coordinates based on the third control command and the relative coordinate data.
[0042] By setting correction conditions, the system determines whether to correct the embroidery path of the embroidery machine, thereby reducing the intervention of the edge computing gateway in the automated operation of the embroidery machine due to embroidery path correction and improving the working efficiency of the embroidery machine.
[0043] refer to Figure 4 In step S301 of some embodiments, determining whether the correction condition is met includes: Step S401: Obtain the cumulative number of actions. When the cumulative number of actions reaches the first preset number, it is determined that the correction condition is met. The cumulative number of actions is incremented when the third control command is sent and reset when the second control command is sent. Step S402: In response to determining that a color-changing event is triggered according to the first control command, it is determined that the calibration conditions are met; Step S403: Obtain embroidery pattern data and determine expected coordinate data based on the embroidery pattern data; when the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, it is determined that the correction condition is met.
[0044] Figure 4 Steps S401, S402, and S403 are parallel steps.
[0045] Optionally, the correction conditions include three types. The first type is used for periodic correction. A cumulative action count is set and recorded on the edge computing gateway to record the number of consecutive embroidery actions. Therefore, when the edge computing gateway sends a third control command (without correction), the cumulative action count increments. If the cumulative action count does not reach a first preset number, the first type of condition is not met. Referring to the other two types of conditions, the first expected number can be set to, for example, 200 or 300. When the cumulative action count reaches the first preset number, the correction condition is met, and the current embroidery action is corrected. Simultaneously, when sending the second control command, the cumulative action count is reset, which is equivalent to performing an embroidery path correction reset every time the first preset number of stitches are performed.
[0046] The second type of condition is used to determine key nodes in the embroidery process. For some key process nodes in the embroidery process, such as color changing, it is necessary to additionally confirm the accuracy of the working coordinates. Therefore, when it is determined according to the first control instruction that the current embroidery action triggers a color changing event, it is judged that the correction condition is met; when it is determined according to the first control instruction that the current embroidery action does not trigger a color changing event, both types of conditions are referred to.
[0047] The third type of condition is used to determine whether to intervene and perform correction and reset based on the actual deviation. Embroidery pattern data is pre-stored on the edge computing gateway. Although the automated workflow is controlled by the control terminal, the edge computing gateway can also compare the embroidery pattern data with the current target coordinate data, specifically comparing the deviation between the expected and target coordinate data. Based on the embroidery pattern data and the current embroidery progress of the product, image analysis technology and other methods can be used to confirm the expected coordinate data. The target coordinate data serves as a reference describing the embroidery machine's current actual working coordinates in absolute coordinates, while the expected coordinate data serves as a reference for the actual product requirements, assessing the degree of deviation between the target and expected coordinate data. When the deviation between the target and expected coordinate data is greater than the deviation threshold, for example, exceeding 0.5mm or 0.7mm, the correction condition is deemed met. When the deviation between the target and expected coordinate data is less than or equal to the deviation threshold, the other two types of conditions are considered.
[0048] Meeting any one of the above three conditions constitutes meeting the correction condition, triggering the generation of a second control command, which instructs the embroidery machine to perform correction and reset.
[0049] By setting three specific calibration conditions, the calibration conditions can cover various work processes that require calibration of the embroidery path, thereby improving the accuracy of remote-controlled embroidery machines and the yield of finished products produced by the embroidery machines.
[0050] refer to Figure 5 In some embodiments, the method further includes: Step S501: Obtain historical coordinate data within the target time period. The historical coordinate data includes the reference coordinate data corresponding to the second preset number of consecutive embroidery actions within the target time period. Step S502: Perform a second-level verification on the historical coordinate data; In step S503, when the verification result of the second-level verification is unsuccessful, a stop command is sent to the embroidery machine, and the embroidery path control process is interrupted.
[0051] Since the first-level verification needs to consider the real-time nature of the embroidery machine's embroidery actions and the latency caused by the verification, it can only check for communication failures between the control terminal and the edge computing gateway. Therefore, the edge computing gateway can be configured to have another thread in the background to execute steps S501 to S503 for the second-level verification. This process can be configured to execute steps S501 to S503 once after each update of the reference coordinate data via step S103, or it can be configured to execute steps S501 to S503 after each embroidery action is completed.
[0052] Specifically, the reference coordinate data corresponding to each embroidery action is recorded on the edge computing gateway, and expired data is periodically cleared. The update of reference coordinate data based on target coordinate data described in the above embodiment refers to updating the reference coordinate data corresponding to the current embroidery action. After updating the reference coordinate data once, the reference coordinate data corresponding to a second preset number of consecutive embroidery actions within a target time period is obtained. This target time period is set to a certain length of time prior to the current moment, and the length of this time period depends on the time required to execute the second preset number of consecutive embroidery actions; for example, the second preset number can be set to 100 or 200. Then, a second level of verification is performed on this historical coordinate data, which includes the second preset number of reference coordinate data.
[0053] The second-level verification can specifically analyze the integrity of the data and the rationality of the embroidery trajectory, and send a stop command to the embroidery machine when the verification result is unsuccessful, interrupting the automated process and realizing error correction from a perspective other than the working coordinates to avoid error accumulation. At the same time, executing the process of this embodiment through another thread also avoids affecting the real-time response of the embroidery machine, and can balance the accuracy of control and production efficiency.
[0054] In some embodiments, a second-level verification is performed on the historical coordinate data, including: Perform at least one of the following checks on historical coordinate data: cyclic redundancy check, physical rationality check, and trajectory continuity check.
[0055] Specifically, the second-level verification may include at least one of cyclic redundancy check, physical rationality check, and trajectory continuity check. Cyclic redundancy check checks the overall integrity of the data, ensuring no tampering, data loss, or transmission errors during transmission. Physical rationality check checks the rationality of the needle bar movement requirements reflected by the coordinates, such as avoiding exceeding the limit travel or requiring the needle bar to achieve unreasonable speeds or accelerations. Trajectory continuity check checks whether the embroidery trajectory is continuous and whether any embroidery action is skipped. These three verification methods can further verify the coordinate data from the perspectives of data integrity and the rationality of the embroidery trajectory, improving the yield rate of embroidery machine production.
[0056] In addition, the latency generated by the above three second-level checks is about 10ms, which is greater than the latency generated by the first-level check. Therefore, it is set as the second-level check and executed by another thread in the background of the edge computing gateway to improve the production efficiency of the embroidery machine.
[0057] Steps S101 to S104 as shown in the embodiments of this application involve maintaining a reference coordinate data described in absolute coordinates on the edge computing gateway. Based on this reference coordinate data, the target coordinate data described in absolute coordinates can be updated synchronously when relative coordinate data is received. The target coordinate data is then combined with the target coordinate data to instruct the embroidery machine to correct its embroidery path, avoiding the problem of coordinate offset caused by controlling only relative coordinates. This improves the accuracy of remote control of the embroidery machine and increases the yield of finished products produced by the embroidery machine.
[0058] refer to Figure 6 To achieve the above objectives, another aspect of this application proposes an embroidery path correction method for an embroidery machine, which is applied to an embroidery machine. The method includes: Step S601: In response to receiving the second control command, determine the target coordinate data according to the second control command; Step S602: Obtain embroidery pattern data and determine the expected coordinate data based on the embroidery pattern data; Step S603: When the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, a reset operation is performed.
[0059] Referring to the above embodiments, the second control command received by the embroidery machine is the edge computing gateway responding to the first control command. The first control command is then subjected to a first-level verification. When the verification result of the first-level verification is passed, relative coordinate data is determined according to the first control command, target coordinate data is determined according to the reference coordinate data and the relative coordinate data, and the target coordinate data and the relative coordinate data are then generated.
[0060] In addition to determining whether embroidery path correction is needed at the edge computing gateway, the embroidery machine itself can also determine whether its embroidery path needs correction based on the embroidery pattern data stored locally. It should be noted that the embroidery pattern data is only data indicating the finished product effect; it does not include information such as embroidery sequence, speed, color change timing, or required embroidery techniques. Therefore, the embroidery machine cannot complete the embroidery work solely based on the embroidery pattern data; it still requires control commands from the control terminal. However, it is possible to determine the expected coordinate data by comparing the embroidery pattern data with the current embroidery progress.
[0061] Therefore, after receiving the second control command, the embroidery machine can compare the target coordinate data and the expected coordinate data extracted from the second control command again. Only when the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, such as 0.5mm or 0.7mm, will the correction reset be performed; when the deviation between the target coordinate data and the expected coordinate data is less than or equal to the deviation threshold, the correction reset will not be performed.
[0062] By reconfirming the degree of deviation on the embroidery machine side, the accuracy of the correction operation is improved, excessive intervention in the embroidery process of the embroidery machine is avoided, and the precision of the correction is improved.
[0063] refer to Figure 7 In step S603 of some embodiments, a reset operation is performed, including: Step S701: Determine the preset reset coordinates of the current working area based on the expected coordinate data; Step S702: Control the needle bar state to reset, and reset the current working coordinates according to the preset reset coordinates; Step S703: Update the current working coordinates based on the expected coordinate data.
[0064] Specifically, the reset operation includes resetting the needle bar's state and working coordinates. Resetting the needle bar's state involves setting its speed to zero and waiting for the working coordinates to complete their reset and update. Resetting the working coordinates requires using preset reset coordinates. It's understandable that the finished embroidery may have a large pattern area, and the embroidery process actually involves moving the fabric to complete the entire pattern; therefore, it's difficult to reset based on a fixed coordinate for the entire pattern. Instead, multiple working areas can be divided according to the finished embroidery pattern, and preset reset coordinates can be set for each area. Based on this, when a reset operation is needed, the current working area and its corresponding preset reset coordinates can be determined based on the expected coordinate data related to the embroidery pattern data. The needle bar's working coordinates are first set to the preset reset coordinates, and then the current working coordinates are updated according to the expected coordinate data, thereby correcting and resetting the embroidery machine's needle bar and embroidery trajectory.
[0065] The following is a detailed description and explanation of the solutions in the embodiments of the present invention, using specific application examples: In this application embodiment, an embroidery path correction method and a control method for an embroidery machine are provided. This method can be applied to a system for remotely controlling an edge computing gateway for automated embroidery and an embroidery machine.
[0066] When the edge computing gateway receives the first control command, it responds by performing a first-level verification on the command. The first-level verification includes at least one of the following: sequence number continuity verification, packet header integrity verification, length validity verification, and direction validity verification.
[0067] When the first-level verification result is passed, relative coordinate data is determined according to the first control command. This relative coordinate data includes the x-axis increment and y-axis increment coordinates. Additionally, reference coordinate data is acquired, which similarly includes the reference x-axis coordinate and reference y-axis coordinate. The target x-axis coordinate is determined based on the reference x-axis coordinate and x-axis increment coordinates, and the target y-axis coordinate is determined based on the reference y-axis coordinate and y-axis increment coordinates. This yields target coordinate data including the target x-axis and target y-axis coordinates, and the reference coordinate data is updated based on the target coordinate data. Both the reference coordinate data and the target coordinate data are described using absolute coordinates.
[0068] Then, it is determined whether the correction conditions are met. Specifically, the correction conditions include three conditions: 1) Obtaining the cumulative action count; when the cumulative action count reaches a first preset number, the correction conditions are met; the cumulative action count is incremented when the third control command is sent and reset when the second control command is sent; or 2) Determining that a color-changing event is triggered based on the first control command, thus confirming that the correction conditions are met; or 3) Obtaining embroidery pattern data and determining the expected coordinate data based on the embroidery pattern data; when the deviation between the target coordinate data and the expected coordinate data is greater than a deviation threshold, the correction conditions are met. Meeting any one of these conditions constitutes a determination that the correction conditions are met.
[0069] When the calibration conditions are met, a second control command is generated based on the target coordinate data and relative coordinate data, and then sent to the embroidery machine. This second control command instructs the embroidery machine to correct the embroidery path according to the target coordinate data and relative coordinate data. When the calibration conditions are not met, a third control command is generated based on the relative coordinate data, and then sent to the embroidery machine. This third control command instructs the embroidery machine to determine the embroidery path based on the relative coordinate data and continue embroidery normally.
[0070] On the other hand, the edge computing gateway also has a background thread for acquiring historical coordinate data within the target time period. This historical coordinate data includes the reference coordinate data corresponding to a second preset number of consecutive embroidery actions within the target time period. A second level of verification is performed on the historical coordinate data; this second level of verification includes at least one of cyclic redundancy verification, physical rationality verification, and trajectory continuity verification. When the result of the second level of verification fails, a stop command is sent to the embroidery machine, and the embroidery path control process is interrupted.
[0071] On the embroidery machine side, upon receiving the second control command, the machine responds by determining the target coordinate data based on the command. It also acquires the embroidery pattern data and determines the expected coordinate data accordingly. When the deviation between the target and expected coordinate data exceeds a threshold, a reset operation is performed. Specifically, the reset operation first determines the preset reset coordinates of the current working area based on the expected coordinate data, then controls the needle bar to reset, resets the current working coordinates based on the preset reset coordinates, and finally updates the current working coordinates based on the expected coordinate data, thus completing the reset operation and correcting the embroidery trajectory.
[0072] This application embodiment maintains a reference coordinate data described in absolute coordinates on the edge computing gateway. Based on this reference coordinate data, the target coordinate data described in absolute coordinates can be updated synchronously when relative coordinate data is received. The target coordinate data is combined to instruct the embroidery machine to correct its embroidery path, avoiding the problem of coordinate offset caused by controlling only by relative coordinates, improving the accuracy of remote control of the embroidery machine, and increasing the yield of the embroidery machine.
[0073] Please see Figure 8 This application also provides an embroidery path control system for an embroidery machine, which can implement the above-mentioned method. The system includes: The first verification module is used to respond to the received first control command and perform a first-level verification on the first control command; when the verification result of the first-level verification is passed, the relative coordinate data is determined according to the first control command. The coordinate processing module is used to acquire reference coordinate data, determine target coordinate data based on the reference coordinate data and relative coordinate data, and update the reference coordinate data based on the target coordinate data. Both the reference coordinate data and the target coordinate data are data described in absolute coordinates. The control module is used to generate a second control command based on the target coordinate data and relative coordinate data, and send the second control command to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and relative coordinate data. The execution module is used to respond to the receipt of the second control command, determine the target coordinate data according to the second control command; acquire the embroidery pattern data, and determine the expected coordinate data according to the embroidery pattern data; and perform a reset operation when the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold.
[0074] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0075] The embroidery path correction method and control method and system for embroidery machines provided in this application embodiment are applied to an edge computing gateway. When a first control command is received, the system responds to the command to perform a first-level verification. When the verification result is passed, the system determines the relative coordinate data indicating the change of the embroidery path according to the first control command, then obtains the reference coordinate data representing the absolute coordinates, determines the target coordinate data according to the reference coordinate data and the relative coordinate data, and updates the reference coordinate data with the target coordinate data to maintain the absolute coordinates. Subsequently, a second control command is generated according to the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine so that the embroidery machine corrects its embroidery path according to the relative coordinate data in the second control command and the target coordinate data representing the absolute coordinates. Compared to controlling the embroidery machine by issuing relative coordinates, the solution in this application maintains a reference coordinate data described in absolute coordinates on the edge computing gateway. Based on this reference coordinate data, the target coordinate data described in absolute coordinates can be updated synchronously when relative coordinate data is received. The target coordinate data is then combined with the target coordinate data to instruct the embroidery machine to correct its embroidery path, avoiding the problem of coordinate offset caused by controlling only relative coordinates. This improves the accuracy of remote control of the embroidery machine and increases the yield of finished products produced by the embroidery machine.
[0076] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0077] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0078] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0080] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0081] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0083] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0084] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0085] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for controlling the embroidery path of an embroidery machine, applied to an edge computing gateway, characterized in that, The method includes the following steps: In response to receiving a first control command, perform a first-level verification on the first control command; When the verification result of the first level is passed, the relative coordinate data is determined according to the first control command; Obtain reference coordinate data, determine target coordinate data based on the reference coordinate data and the relative coordinate data, and update the reference coordinate data based on the target coordinate data, wherein both the reference coordinate data and the target coordinate data are data described in absolute coordinates; A second control command is generated based on the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and the relative coordinate data.
2. The method according to claim 1, characterized in that, After updating the reference coordinate data based on the target coordinate data, the method further includes: Determine whether the correction conditions are met; When the correction conditions are met, the second control command is generated based on the target coordinate data and the relative coordinate data, and the second control command is sent to the embroidery machine. When the correction conditions are not met, a third control command is generated based on the relative coordinate data and sent to the embroidery machine. The third control command is used to instruct the embroidery machine to determine the embroidery path based on the relative coordinate data.
3. The method according to claim 2, characterized in that, Determining whether the correction conditions are met includes: The cumulative number of actions is obtained. When the cumulative number of actions reaches a first preset number, it is determined that the correction condition is met. The cumulative number of actions is incremented when the third control command is sent and reset when the second control command is sent. Alternatively, in response to determining that a color-changing event is triggered according to the first control instruction, it is determined that the correction condition is met; Alternatively, embroidery pattern data can be obtained, and expected coordinate data can be determined based on the embroidery pattern data; when the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, it is determined that the correction condition is met.
4. The method according to claim 1, characterized in that, The first-level verification of the first control command includes: The first control command is subjected to at least one of the following checks: serial number continuity check, header integrity check, length validity check, and direction validity check.
5. The method according to claim 1, characterized in that, The method further includes: Acquire historical coordinate data within a target time period, wherein the historical coordinate data includes the reference coordinate data corresponding to a second preset number of consecutive embroidery actions within the target time period; The historical coordinate data is subjected to a second level of verification; When the verification result of the second-level verification is unsuccessful, a stop command is sent to the embroidery machine, and the embroidery path control process is interrupted.
6. The method according to claim 5, characterized in that, The second-level verification of the historical coordinate data includes: The historical coordinate data shall be subjected to at least one of the following checks: cyclic redundancy check, physical rationality check, and trajectory continuity check.
7. The method according to any one of claims 1 to 6, characterized in that, The reference coordinate data includes reference x-axis coordinates and reference y-axis coordinates, and the relative coordinate data includes x-axis increment coordinates and y-axis increment coordinates. Determining the target coordinate data based on the reference coordinate data and the relative coordinate data includes: The target x-axis coordinates are determined based on the reference x-axis coordinates and the incremental x-axis coordinates. The target y-axis coordinate is determined based on the reference y-axis coordinate and the incremental y-axis coordinate, wherein the target coordinate data includes the target x-axis coordinate and the target y-axis coordinate.
8. A method for correcting the embroidery path in an embroidery machine, characterized in that, The method includes the following steps: In response to receiving a second control command, target coordinate data is determined according to the second control command; wherein, the second control command is an edge computing gateway responding to a first control command, performing a first-level verification on the first control command, and when the verification result of the first-level verification is passed, relative coordinate data is determined according to the first control command, target coordinate data is determined according to the reference coordinate data and the relative coordinate data, and generated according to the target coordinate data and the relative coordinate data; Obtain the embroidery pattern data, and determine the expected coordinate data based on the embroidery pattern data; When the deviation between the target coordinate data and the expected coordinate data is greater than the deviation threshold, a reset operation is performed.
9. The method according to claim 8, characterized in that, The reset operation includes: Determine the preset reset coordinates of the current working area based on the expected coordinate data; The control needle bar state is reset, and the current working coordinates are reset according to the preset reset coordinates; Update the current working coordinates based on the expected coordinate data.
10. An embroidery path control system for an embroidery machine, characterized in that, The system includes: The first verification module is used to respond to the receipt of the first control command and perform a first-level verification on the first control command; when the verification result of the first-level verification is passed, the relative coordinate data is determined according to the first control command. A coordinate processing module is used to acquire reference coordinate data, determine target coordinate data based on the reference coordinate data and the relative coordinate data, and update the reference coordinate data based on the target coordinate data, wherein the reference coordinate data and the target coordinate data are both data described in absolute coordinates; The control module is used to generate a second control command based on the target coordinate data and the relative coordinate data, and to send the second control command to the embroidery machine. The second control command is used to instruct the embroidery machine to correct the embroidery path based on the target coordinate data and the relative coordinate data. The execution module is used to respond to receiving a second control command, determine target coordinate data according to the second control command; acquire embroidery pattern data, and determine expected coordinate data according to the embroidery pattern data; and perform a reset operation when the deviation between the target coordinate data and the expected coordinate data is greater than a deviation threshold.