CN108315879B - Pattern editing method and device - Google Patents

Pattern editing method and device Download PDF

Info

Publication number
CN108315879B
CN108315879B CN201710036392.0A CN201710036392A CN108315879B CN 108315879 B CN108315879 B CN 108315879B CN 201710036392 A CN201710036392 A CN 201710036392A CN 108315879 B CN108315879 B CN 108315879B
Authority
CN
China
Prior art keywords
target
pattern
instruction
editing
operation instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710036392.0A
Other languages
Chinese (zh)
Other versions
CN108315879A (en
Inventor
刘宝森
邢少鹏
胡文海
侯文学
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xingdahao Information Technology Co ltd
Zhuji Xingdahao Technology Development Co ltd
Beijing Dahao Technology Co Ltd
Original Assignee
Beijing Xingdahao Information Technology Co ltd
Zhuji Xingdahao Technology Development Co ltd
Beijing Dahao Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xingdahao Information Technology Co ltd, Zhuji Xingdahao Technology Development Co ltd, Beijing Dahao Technology Co Ltd filed Critical Beijing Xingdahao Information Technology Co ltd
Priority to CN201710036392.0A priority Critical patent/CN108315879B/en
Publication of CN108315879A publication Critical patent/CN108315879A/en
Application granted granted Critical
Publication of CN108315879B publication Critical patent/CN108315879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • DTEXTILES; PAPER
    • D05SEWING; EMBROIDERING; TUFTING
    • D05BSEWING
    • D05B9/00Hem-stitch sewing machines
    • DTEXTILES; PAPER
    • D05SEWING; EMBROIDERING; TUFTING
    • D05BSEWING
    • D05B19/00Programme-controlled sewing machines
    • D05B19/02Sewing machines having electronic memory or microprocessor control unit
    • D05B19/04Sewing machines having electronic memory or microprocessor control unit characterised by memory aspects
    • D05B19/08Arrangements for inputting stitch or pattern data to memory ; Editing stitch or pattern data

Abstract

The invention discloses a method and a device for editing a pattern, wherein the method comprises the following steps: receiving a canceling instruction for a target pattern element in pattern editing, and executing the canceling operation of the target pattern element according to the canceling instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to the operating instruction and have a first sequence, and each pattern element corresponds to one operating instruction; storing a target operation instruction corresponding to the information of the target pattern element in a first storage area; receiving a reduction operation instruction aiming at the target pattern element; and acquiring a target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in pattern editing. According to the method and the device for pattern editing, the undo operation of the pattern machine in the pattern editing process can be effectively reduced, and the pattern editing efficiency of the pattern machine is improved.

Description

Pattern editing method and device
Technical Field
The invention relates to the technical field of pattern machines, in particular to a method and a device for pattern editing.
Background
The pattern sewing machine is a novel intelligent electromechanical integrated sewing device adopting an embedded system technology, and is mainly used for processing products such as clothes, bags, shoes, hats and the like. The pattern sewing machine adopts an upper computer and a lower computer, the upper computer provides friendly operation interface, parameter setting and pattern editing, and sends user commands, record display and other functions to the lower computer; and the lower computer receives various information of the upper computer and executes operation according to the instruction of the user. Pattern editing is an important function in a pattern machine, provides flexible and powerful pattern customizing functions for users, facilitates the users to make patterns and sew in real time, and enables the users to meet the pattern requirements of a demand party in time.
At present, a pattern machine can only cancel a pattern after performing pattern editing operation, the cancellation operation cannot be restored, and once the pattern machine fails to operate, great inconvenience is caused.
Therefore, a method is needed to effectively restore the undo operation of the pattern machine in the pattern editing process.
Disclosure of Invention
The embodiment of the invention provides a method and a device for pattern editing, which aim to solve the problem that the existing pattern machine cannot restore the canceling operation after canceling in the pattern editing process.
A first aspect of the invention provides a method of pattern editing, comprising:
receiving a canceling instruction for a target pattern element in pattern editing, and executing canceling operation of the target pattern element according to the canceling instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to operation instructions and have a first sequence, and each pattern element corresponds to one operation instruction;
storing a target operation instruction corresponding to the information of the target pattern element in a first storage area;
receiving a reduction operation instruction aiming at the target pattern element;
and acquiring the target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in the pattern editing.
According to the method, optionally, if the number of the target pattern elements is plural, the performing the restoring operation of the target pattern elements according to the target operation command includes:
and executing the restoration operation of the plurality of target pattern elements according to the target operation commands according to the first sequence.
According to the method, optionally, the storing a target operation command corresponding to the information of the target pattern element in the first storage area comprises:
sequentially storing the target operation instructions corresponding to the information of each target pattern element in a first-in-first-out stack structure according to a second sequence, wherein the second sequence is opposite to the first sequence;
the acquiring the target operation instruction from the first storage area comprises:
and sequentially acquiring each target operation instruction from the stack structure according to the first sequence.
According to the method, optionally, after the target pattern element is restored in the pattern editing, the method further comprises:
receiving a confirmation instruction aiming at the reduction operation instruction;
and deleting the target operation instruction in the first storage area according to the confirmation instruction.
According to the method, optionally, before receiving an instruction of canceling the target step of the pattern editing, the method further includes:
executing editing operation according to the operation instruction, and correspondingly generating a first linked list, wherein the first linked list comprises information of a plurality of pattern elements with a first sequence;
after receiving an instruction for canceling a target pattern element in pattern editing and before receiving an instruction for restoring the target pattern element, the method further comprises the following steps:
deleting the information of the target pattern elements in the first linked list;
after receiving a reduction operation instruction for the target pattern element, the method further comprises the following steps:
and restoring the information of the target pattern element in the first linked list.
Another aspect of the present invention provides an apparatus for pattern editing, including:
the pattern editing device comprises a first receiving module, a second receiving module and a display module, wherein the first receiving module is used for receiving a cancel instruction for a target pattern element in pattern editing, the pattern editing comprises a plurality of pattern elements which are edited according to an operation instruction and have a first sequence, and each pattern element corresponds to one operation instruction;
the processing module is used for executing the canceling operation of the target pattern element according to the canceling instruction;
the storage module is used for storing a target operation instruction corresponding to the information of the target pattern element in a first storage area;
the second receiving module is used for receiving a reduction operation instruction aiming at the target pattern element;
the acquisition module is used for acquiring the target operation instruction from the first storage area according to the restoration operation instruction;
and the first restoring module is used for executing the restoring operation of the target pattern element according to the target operation instruction so as to restore the target pattern element in the pattern editing.
According to the above-described apparatus, alternatively, if the number of the target pattern elements is plural,
the first reduction module is specifically configured to:
and executing the restoration operation of the plurality of target pattern elements according to the target operation commands according to the first sequence.
According to the apparatus as described above, optionally, the storage module is specifically configured to: sequentially storing the target operation instructions corresponding to the information of each target pattern element in a first-in-first-out stack structure according to a second sequence, wherein the second sequence is opposite to the first sequence;
the acquisition module is specifically configured to: and sequentially acquiring each target operation instruction from the stack structure according to the first sequence.
The apparatus as described above, optionally, further comprising a first deleting module, where the first deleting module is configured to:
receiving a confirmation instruction aiming at the reduction operation instruction;
and deleting the target operation instruction in the first storage area according to the confirmation instruction.
The apparatus as described above, optionally, further comprising:
the first editing module is used for executing editing operation according to an operation instruction, and the first linked list comprises information of a plurality of pattern elements with a first sequence;
the second deleting module is used for deleting the information of the target pattern elements in the first linked list;
and the second restoring module is used for restoring the information of the target pattern element in the first linked list.
According to the method and the device for editing the pattern, the target operation instruction corresponding to the cancelled target pattern element is stored in the first storage area, the target operation instruction is acquired from the first storage area according to the restoration operation instruction aiming at the target pattern element, and the target pattern element is restored according to the target operation instruction, so that the restoration of the pattern editing and cancelling operation is realized, the defect that only the cancelling operation can be realized but not the cancelling operation can be restored in the prior art is overcome, and the efficiency of pattern editing is improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved.
Drawings
Fig. 1 is a schematic flow chart of a pattern editing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for editing designs according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for editing patterns according to yet another embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for editing a pattern according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a pattern editing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a pattern editing apparatus according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a pattern editing apparatus according to still another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The present embodiment provides a pattern editing method for editing patterns. The execution subject of the present embodiment is a pattern editing apparatus, which can be provided in a pattern machine.
As shown in fig. 1, a schematic flowchart of a method for editing a pattern provided by an embodiment includes:
step 101, receiving a canceling instruction for a target pattern element in pattern editing, and executing a canceling operation of the target pattern element according to the canceling instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to the operating instruction and have a first sequence, and each pattern element corresponds to one operating instruction.
Pattern editing is editing of pattern patterns for creating various patterns on fabrics of products such as clothing, bags, shoes and hats. In the process of pattern editing, a first linked list is generated according to an operation instruction, the first linked list comprises a plurality of pattern elements with a first sequence, the pattern elements are basic units for forming patterns, and the pattern elements comprise information such as shapes, stitches (such as multiple stitches, zigzag stitches, backstitches and the like), stitch positions, mechanical actions and the like. When the pattern is edited, the device executes corresponding operation according to an operation instruction sent by a user to edit a corresponding pattern, for example, a blank linked list is preset, when the operation instruction received by the device is to edit a pattern element A, the device executes editing operation according to the operation instruction to edit the pattern element A, the pattern element A is added in the linked list, next, another operation instruction is to edit a pattern element B, the device executes editing operation according to the operation instruction to edit the pattern element B, the pattern element B is added behind the A in the linked list until the whole pattern editing is completed, and at this time, the corresponding linked list is the first linked list. Of course, the pattern editing operation may also be an operation of editing patterns on the cloth according to the already designed first linked list, which is not described in detail.
Alternatively, the operation instruction may be stored in another second storage area in this embodiment.
In the present embodiment, the pattern editing includes a plurality of pattern elements on which an editing operation has been performed, that is, a pattern is currently edited by a user using a pattern editing apparatus.
When the user finds that the edited pattern elements are unsatisfactory or less than ideal, part of the pattern elements are changed, for example by sending an undo command for the target pattern element to undo one or more of the edited pattern elements, i.e. the target pattern element is one or more of the edited pattern elements.
When the device receives a cancel instruction of a user for the target pattern element, corresponding cancel operation is executed. For example, when a pattern element a, a pattern element B, and a pattern element C are sequentially edited, and when a cancel operation for the target pattern element, i.e., the pattern element C, is received, the already edited pattern element C needs to be canceled, and the pattern edit after the cancel operation includes the pattern element a and the pattern element B.
The corresponding relationship between the pattern elements and the operation instructions can be obtained through the specific content of the operation instructions, and details are not repeated.
The withdrawal instruction of the present embodiment may include information on the target pattern element, and may further include a target operation instruction corresponding to the target pattern element.
And 102, storing a target operation instruction corresponding to the information of the target pattern element in a first storage area.
The target operation command is a command for editing the corresponding target pattern element. The device stores a target operation instruction corresponding to the information of the target pattern element into a first storage area after receiving a cancel instruction of a user for the target pattern element, and cancels the previous editing of the target pattern element. For example, when a cancel operation command for a target pattern element, i.e., the pattern element C, is received, the target operation command corresponding to the information of the pattern element C is stored in the first storage area, and the editing of the target pattern element C before the cancel operation, i.e., the editing of the pattern element C is canceled, and the pattern editing after the cancel operation includes the pattern element a and the pattern element B.
It can be understood that, for the revoked target pattern elements, the target pattern elements may be deleted directly, or may be stored in the second linked list, so that when the target pattern elements need to be restored later, the target pattern elements may be obtained from the second linked list according to the restoration operation instruction and stored in the first linked list. For example, the pattern element C that is revoked may be directly deleted, or may be stored in the second linked list, so that when restoration is needed later, the pattern element C may be obtained from the second linked list according to the restoration operation instruction and stored in the first linked list to restore the target operation element.
The first storage area of this embodiment may be implemented by a stack, a list, an array, or other data structures that can identify the order, as long as the apparatus can recognize the order of the target operation instruction by the storage method.
And 103, receiving a reduction operation command for the target pattern element.
When the user finds that the user does not want to cancel the cancelled pattern elements, a restoration operation instruction for the target pattern elements may be transmitted. The restore operation command may include identification information of the target operation command or information of the target pattern element to determine which target pattern element is restored. For example, there are 2 pattern elements to be sequentially cancelled, and if the user wants to restore only the last cancelled target pattern element, the device needs to include information on the target pattern element or information on the target operation command corresponding to the target pattern element in the restoration operation command so as to be able to recognize the pattern elements.
The pattern editing device receives a reduction operation instruction for the target pattern element and executes the reduction operation.
And 104, acquiring a target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in pattern editing.
The device receives a reduction operation instruction for the target pattern element, acquires the target operation instruction corresponding to the target pattern element from the first storage area according to the reduction operation instruction, and executes the reduction operation of the target pattern element according to the target operation instruction so as to reduce the cancelled target pattern element in pattern editing. The restoring operation may be an editing operation on the target pattern elements according to the target operation instruction, or may be an acquiring operation of the target pattern elements stored in the second linked list and storing the acquired target pattern elements in the first linked list to restore the target pattern elements.
In the method for editing patterns provided by this embodiment, the target operation instruction corresponding to the revoked target pattern element is stored in the first storage area, and then the target operation instruction is acquired from the first storage area according to the restore operation instruction for the target pattern element, and the target pattern element is restored according to the target operation instruction, thereby restoring the pattern edit revocation operation, overcoming the defect that only the revocation operation can be realized but not the revocation operation in the prior art, and improving the pattern editing efficiency. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved. Example two
This embodiment further supplements the method for pattern editing provided in the first embodiment.
As shown in fig. 2, a schematic flowchart of a method for editing a pattern provided by an embodiment includes:
step 201, receiving a revocation instruction for a plurality of target pattern elements in pattern editing, and executing revocation operation of the plurality of target pattern elements according to the revocation instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to the operation instruction and have a first sequence, and each pattern element corresponds to one operation instruction.
When the user finds that the plurality of pattern elements already edited are unsatisfactory or unsatisfactory, part of the pattern elements are changed, for example, by sending an undo instruction for a plurality of target pattern elements to undo a plurality of already edited pattern elements, i.e., a plurality of already edited pattern elements.
After receiving the canceling instructions of the user for the target pattern elements, the device executes corresponding canceling operation. The target pattern elements are edited according to the target operation instructions in a first order.
As an illustrative example, three pattern elements are edited according to three operation instructions in a first order: a. a straight line, b, a circle, c, a straight line. Then, the user finds that the pattern formed by the three pattern elements is not satisfactory or not ideal, and wants to cancel the three times of editing, a cancel instruction for the three pattern elements can be sent, and the pattern editing device executes a cancel operation after receiving the cancel instruction for the three pattern elements by the user. It will be appreciated that the user may also undo the two pattern elements that were last edited.
The specific operation of this step is the same as that of step 101, and is not described herein again.
Step 202, sequentially storing the target operation commands corresponding to the information of each target pattern element in a first-in-first-out stack structure according to a second sequence, wherein the second sequence is opposite to the first sequence.
The device receives the canceling instructions of the target pattern elements by the user, and sequentially stores the target operation instructions corresponding to the information of the target pattern elements in a stack structure according to a second sequence opposite to the first sequence, wherein the stack structure is a first-in and last-out data structure.
For example, after receiving a cancel command for the edited three pattern elements a, b, and c, the device stores a target operation command c ' corresponding to the information of the pattern element c in the stack, stores a target operation command b ' corresponding to the information of the pattern element b in the stack, and stores a target operation command a ' corresponding to the information of the pattern element a in the stack in a second order opposite to the order of a, b, and c, that is, in the order of c, b, and a.
In step 203, a restore operation command for a plurality of target pattern elements is received.
When the user finds that the plurality of the withdrawn target pattern elements are not to be withdrawn, a restoring operation instruction for the plurality of the target pattern elements can be transmitted. The restore operation command may include identification information of each target operation command or information of each target pattern element to determine which target pattern elements are to be restored. For example, if there are 3 pattern elements that are sequentially cancelled and the user wants to restore only the last two cancelled target pattern elements, the restore operation command needs to include information on the two target pattern elements or information on the target operation commands corresponding to the two target pattern elements so that the device can recognize the two target pattern elements.
The device receives restoring operation instructions aiming at a plurality of target pattern elements so as to execute restoring operation.
The specific operation of this step is identical to that of step 103, and is not described herein again.
And step 204, sequentially acquiring the target operation instructions from the stack structure according to the reduction operation instruction according to the first sequence, and executing the reduction operation of the target pattern elements according to the target operation instructions so as to reduce the target pattern elements in the pattern editing.
The device receives a restore operation command for a plurality of target pattern elements, acquires the target operation commands corresponding to the information of the target pattern elements from the stack structure according to a first sequence according to the restore operation command, and executes the restore operation of the target pattern elements according to the target operation commands according to the first sequence so as to restore the cancelled target pattern elements in pattern editing.
For example, after receiving the restore operation commands for the three revoked target pattern elements, the pattern editing apparatus acquires the target operation commands corresponding to the information of the three target pattern elements from the stack structure according to the restore operation commands in the first order, i.e., the order of a, b, and c, and performs the restore operation of the target pattern elements according to the target operation commands in the first order, that is, first acquires a target operation command a ' from the stack structure and performs the restore operation of the pattern element a, then acquires a target operation command b ' from the stack structure and performs the restore operation of the pattern element b, and finally acquires a target operation command c ' from the stack structure and performs the restore operation of the pattern element c to restore the three revoked target pattern elements in the pattern editing.
It can be understood that the restoring operation may be to edit the target pattern element according to the target operation instruction, or to obtain the target pattern element stored in the second linked list and store the target pattern element in the first linked list to restore the target pattern element.
In the method for pattern editing provided by this embodiment, the target operation instructions corresponding to the information of the cancelled target pattern elements are stored in the first-in-last-out stack structure according to the second sequence opposite to the first sequence, the target operation instructions are obtained from the stack structure according to the first sequence according to the restore operation instructions for the target pattern elements, and the target pattern elements are restored according to the target operation instructions and the first sequence, so that not only the restoration of the pattern editing and canceling operation is realized, but also the multiple canceling operations of the pattern editing and canceling operations can be restored, and the multiple canceling operations can be restored. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved.
EXAMPLE III
This embodiment will be described in addition to the above embodiments.
As shown in fig. 3, a schematic flowchart of a method for editing a pattern provided by an embodiment includes:
step 301, receiving a revocation instruction for a target pattern element in pattern editing, and executing a revocation operation of the target pattern element according to the revocation instruction, wherein the pattern editing includes a plurality of pattern elements having a first sequence edited according to the operation instruction, and each pattern element corresponds to one operation instruction.
The specific operation of this step is the same as that of step 101, and is not described herein again.
Step 302, storing a target operation command corresponding to the information of the target pattern element in a first storage area.
The specific operation of this step is the same as that of step 102, and is not described herein again.
Step 303 receives a restore operation command for the target pattern element.
The specific operation of this step is identical to that of step 103, and is not described herein again.
And step 304, acquiring a target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in pattern editing.
The specific operation of this step is the same as that of step 104, and is not described herein again.
Step 305, receiving a confirmation instruction for the restore operation instruction.
After the target pattern elements that have been cancelled are restored in the pattern editing, the user can send a confirmation command for the restoration operation command, and the pattern editing apparatus can receive the confirmation command for the restoration operation command.
And step 306, deleting the target operation instruction in the first storage area according to the confirmation instruction.
The pattern editing apparatus receives a confirmation command for the restoration operation command, and deletes the target operation command in the first storage area based on the confirmation command.
In the method for editing patterns provided by this embodiment, the target operation instruction corresponding to the revoked target pattern element is stored in the first storage area, and then the target operation instruction is acquired from the first storage area according to the restore operation instruction for the target pattern element, and the target pattern element is restored according to the target operation instruction, so that the restore operation of the pattern edit revocation is implemented, the defect that only the revocation operation can be implemented but the revocation operation cannot be restored in the prior art is overcome, and the efficiency of pattern edit is improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved. In addition, the memory space of the pattern sewing machine is further saved by deleting the target operation instruction in the first storage area according to the confirmation instruction of the restoration operation instruction.
Example four
This embodiment will be described in addition to the above embodiments. This embodiment mainly describes the first linked list in the pattern editing in further detail.
As shown in fig. 4, a schematic flowchart of a method for editing a pattern provided by an embodiment includes:
step 401, according to the operation instruction, performing an editing operation, and correspondingly generating a first linked list, where the first linked list includes information of a plurality of pattern elements in a first order.
The operation instruction is instruction information for editing the pattern elements, the first linked list is a data structure for storing information of the pattern elements, and the editing operation is executed according to the operation instruction, that is, the information of the edited pattern elements is added to the first linked list. For example, if a pattern element (for example, a straight line) needs to be added in accordance with an operation command, the pattern editing apparatus adds information on the pattern element to the first list, and the information on the plurality of pattern elements is added in a first order.
Step 402, receiving a canceling instruction for a target pattern element in pattern editing, and executing a canceling operation of the target pattern element according to the canceling instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to an operating instruction and have a first sequence, and each pattern element corresponds to one operating instruction.
The target pattern elements may be one or more, and are not particularly limited, refer to step 101 or 201, and are not described herein again.
In step 403, a target operation command corresponding to the information of the target pattern element is stored in the first storage area.
If the number of the target pattern elements is one, the target operation commands corresponding to the information of the target pattern elements are stored in the first storage area, and if the number of the target pattern elements is multiple, the target operation commands corresponding to the information of each target pattern element are sequentially stored in the first-in-last-out stack structure according to a second order, wherein the second order is opposite to the first order. Referring specifically to step 102 or 202, the detailed description is omitted here.
In step 404, the information of the target pattern element in the first linked list is deleted.
The pattern editing apparatus deletes information of one or more target pattern elements in the first linked list.
There is no requirement on the execution sequence of step 403 and step 404, and step 403 may be executed first, or step 404 may be executed first, which is not limited herein.
In step 405, a restore operation instruction for the target operation instruction is received.
When the number of the target pattern elements is plural, a restore operation command for the plural target operation commands is received. See step 103 or 203 for details, which are not described herein.
And step 406, acquiring a target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in pattern editing.
When a target pattern element is to be restored, the target operation instruction is acquired from the first storage area according to the restoration operation instruction, and the restoration operation of the target pattern element is executed according to the target operation instruction so as to restore the target pattern element in pattern editing. When the target pattern elements are to be restored, the target operation commands are sequentially acquired from the stack structure according to the restoration operation command in a first order, and the restoration operation of the target pattern elements is executed according to the target operation commands, so that the target pattern elements are restored in pattern editing. Refer to step 104 or 204 specifically, and will not be described herein.
In step 407, the information of the target pattern element is restored in the first linked list.
Correspondingly, the number of the target pattern elements is one or more, and if the number of the target pattern elements is more than one, the information of the target pattern elements is added to the first linked list according to the first sequence.
There is no requirement on the execution sequence of step 406 and step 407, and step 406 may be executed first, or step 407 may be executed first, which is not limited herein.
Alternatively, the step 404 may be that the pattern editing apparatus extracts information of one or more target pattern elements in the first linked list and puts the information into the second linked list.
Correspondingly, step 407 is that the pattern editing apparatus extracts one or more target pattern elements from the second linked list, and puts them into the first linked list according to the operation instruction, thereby completing the restoration of the information of the target pattern elements.
Optionally, after step 407, the method further includes:
a confirmation instruction for the restore operation instruction is received. Referring specifically to step 305, further description is omitted here.
And deleting the target operation instruction in the first storage area according to the confirmation instruction. Referring specifically to step 306, the detailed description is omitted here.
According to the method for editing the pattern, the target operation instruction and the information of the corresponding target pattern element are cancelled according to the cancelling instruction, and the cancelled target operation instruction and the information of the corresponding target pattern element can be restored according to the restoring operation instruction, so that the restoring of the pattern editing cancelling operation is realized, the defect that only the cancelling operation can be realized but the cancelling operation cannot be restored in the prior art is overcome, and the editing efficiency and the user experience are improved. Moreover, when the number of the target pattern elements is multiple, the multiple target operation instructions and the corresponding information of the multiple target pattern elements can be cancelled according to the second sequence, and the cancelled multiple target operation instructions and the corresponding information of the multiple target pattern elements can be restored according to the first sequence, so that the multiple cancelling and restoring are realized, the editing efficiency is further improved, and the user experience is greatly improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved. Meanwhile, the pattern elements stored in the finally edited first linked list can form patterns meeting requirements by editing the first linked list storing the information of the pattern elements, and the first linked list can be used as a sample plate to be directly used by other pattern machines, so that convenience is provided for users.
EXAMPLE five
This embodiment is an exemplary explanation of the method of editing the foregoing pattern.
Alternatively, the foregoing embodiments of the present invention may also be used to modify and edit already-finished designs, which may be understood as designs that have not been actually edited on a piece of cloth or other physical component.
For example, a pattern that has been completed includes a pattern element a, a pattern element B, a pattern element C, and a pattern element D, which correspond to an operation command 1, an operation command 2, an operation command 3, and an operation command 4, respectively, and information of these four pattern elements is sequentially stored in a first linked list, and in addition, the operation command 1, the operation command 2, the operation command 3, and the operation command 4 are stored in a second storage area.
When a user wants to modify the pattern element B and the pattern element D and sends an instruction, the device receives an operation instruction 2 'and an operation instruction 4' for modifying the pattern element B and the pattern element D, stores the operation instruction 2 and the operation instruction 4 corresponding to the information of the pattern element B and the pattern element D in a second storage area according to a first sequence, stores the information of the pattern element B and the pattern element D in a first chain table in the second chain table according to the first sequence, and then edits new information of the pattern element B 'and the pattern element D' according to the operation instruction 2 'and the operation instruction 4' and stores the new information of the pattern element B 'and the pattern element D' in positions corresponding to the information of the pattern element B and the pattern element D in the first chain table so as to modify the pattern.
It should be understood that the editing operation may be deleting, modifying, replacing, or inserting a new pattern element in front of or behind the target pattern element, or may be adding a new pattern element before the first pattern element or after the last pattern element of the pattern, and is not limited in particular.
When a cancel instruction for the pattern element B 'and the pattern element D' is received, the operation instruction 2 'and the operation instruction 4' corresponding to the information of the pattern element B 'and the pattern element D' are stored in the first storage area in the second order, the information of the pattern element B 'and the pattern element D' in the first list is stored in the third list in the second order, and the information of the pattern element B and the pattern element D in the second list is stored in the first list in the position where the information of the pattern element B 'and the pattern element D' is restored, so as to cancel the previous editing operation on the pattern element B and the pattern element D.
When receiving a reduction operation instruction for the pattern elements B 'and D', acquiring an operation instruction 2 'and an operation instruction 4' corresponding to the information of the pattern elements B 'and D' from the first storage area according to a first sequence, executing reduction operation according to the operation instruction, storing the information of the pattern elements B and D in the first list into the second list according to the first sequence, and storing the information of the pattern elements B 'and D' in the third list into corresponding positions of the first list according to the first sequence to reduce the pattern elements B 'and D' which are cancelled before.
Accordingly, after the restoration operation is completed, the apparatus may receive a confirmation instruction for the restoration operation instruction, and delete the operation instruction in the first storage area and the second storage area according to the confirmation instruction.
Alternatively, the first storage area and the second storage area may be implemented by a stack, a list, an array, or other data structures that can identify the order, as long as the apparatus can recognize the order of the target operation instruction by a storage method.
It is to be understood that the first, second and third embodiments described above are merely for distinction and do not represent an order.
EXAMPLE six
The present embodiment provides a pattern editing apparatus for executing the pattern editing method of the first embodiment.
Fig. 5 is a schematic structural diagram of a pattern editing apparatus according to this embodiment. The pattern editing apparatus 500 of the present embodiment includes a first receiving module 501, a processing module 502, a storage module 503, a second receiving module 504, an obtaining module 505, and a first restoring module 506.
The first receiving module 501 is configured to receive a cancel instruction for a target pattern element in pattern editing, where the pattern editing includes a plurality of pattern elements in a first order, which are edited according to an operation instruction, and each pattern element corresponds to one operation instruction; the processing module 502 is configured to execute a revocation operation of the target pattern element according to the revocation instruction received by the first receiving module 501; the storage module 503 is configured to store a target operation instruction corresponding to information of a target pattern element specified in the withdrawal instruction received by the first receiving module 501 in the first storage area; the second receiving module 504 is configured to receive a reduction operation instruction for the target pattern element; the obtaining module 505 is configured to obtain a target operation instruction from the first storage area according to the restoration operation instruction received by the second receiving module 504; the first restoring module 506 is configured to perform a restoring operation of the target pattern element according to the target operation instruction acquired by the acquiring module 505, so as to restore the target pattern element in pattern editing.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
According to the pattern editing device 500 of the embodiment, the target operation instruction corresponding to the cancelled target pattern element is stored in the first storage area, the target operation instruction is obtained from the first storage area according to the restoration operation instruction for the target pattern element, and the target pattern element is restored according to the target operation instruction, so that the restoration of the pattern editing cancellation operation is realized, the defect that only the cancellation can be realized but the cancellation operation cannot be restored in the prior art is overcome, and the pattern editing efficiency is improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved.
EXAMPLE seven
This embodiment further supplements the apparatus for pattern editing of the sixth embodiment to perform the method for pattern editing of the second embodiment.
As shown in fig. 5, in the pattern editing apparatus 500 according to the present embodiment, if there are a plurality of target pattern elements, the first restoring module 506 is specifically configured to perform restoring operations of the plurality of target pattern elements according to the target operation commands acquired by the acquiring module 505 in the first order; the storage module 503 is specifically configured to sequentially store, in a second order, the target operation instructions corresponding to the information of each target pattern element specified in the revocation instruction received by the first receiving module 501 in a first-in last-out stack structure, where the second order is opposite to the first order; the obtaining module 505 is specifically configured to sequentially obtain each target operation instruction from the stack structure according to the first order according to the restore operation instruction received by the second receiving module 504.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
According to the pattern editing apparatus 500 of the present embodiment, the plurality of target operation instructions corresponding to the information of the plurality of target pattern elements that are to be cancelled are stored in the first-in-last-out stack structure in the second order opposite to the first order, the plurality of target operation instructions are obtained from the stack structure in the first order according to the restore operation instructions for the plurality of target pattern elements, and the plurality of target pattern elements are restored according to the first order according to the plurality of target operation instructions, so that not only the restoration of the pattern editing and cancelling operation is achieved, but also the multiple cancelling operation of the pattern editing operation is achieved, and the multiple cancelling operation is restored. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved.
Example eight
This embodiment further supplements the apparatus for pattern editing in the sixth embodiment to execute the method for pattern editing in the third embodiment.
As shown in fig. 6, the apparatus 500 for editing designs according to the present embodiment further includes: a first deletion module 507.
The first deleting module 507 is configured to receive a confirmation instruction for the restore operation instruction, and delete the target operation instruction in the first storage area according to the confirmation instruction.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
According to the pattern editing device 500 of the embodiment, the target operation instruction corresponding to the cancelled target pattern element is stored in the first storage area, the target operation instruction is obtained from the first storage area according to the restoration operation instruction for the target pattern element, and the target pattern element is restored according to the target operation instruction, so that the restoration of the pattern editing cancellation operation is realized, the defect that only the cancellation can be realized but the cancellation operation cannot be restored in the prior art is overcome, and the pattern editing efficiency is improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved. In addition, the information of the revoked part is recorded as the operation command, and the information of the operation command is small, for example, smaller than the information of the pattern element, so that the memory space of the pattern machine can be further saved. In addition, the memory space of the pattern sewing machine is further saved by deleting the target operation instruction in the first storage area according to the confirmation instruction of the restoration operation instruction.
Example nine
This embodiment further supplements the apparatus for pattern editing of the previous embodiment to perform the method for pattern editing of the fourth embodiment.
As shown in fig. 7, the apparatus 500 for editing designs according to the present embodiment further includes: a first editing module 508, a second deleting module 509, and a second restoring module 510.
The first editing module 508 is configured to perform an editing operation according to an operation instruction, where the first linked list includes information of a plurality of pattern elements in a first order; the second deleting module 509 is configured to delete information of the target pattern element in the first linked list corresponding to the revocation instruction received by the first receiving module 501; the second restoring module 510 is configured to restore, in the first linked list, information of the target pattern element corresponding to the restoring operation instruction received by the second receiving module 504.
The specific manner in which the respective modules perform operations has been described in detail in relation to the apparatus in this embodiment, and will not be elaborated upon here.
According to the pattern editing device 500 of the embodiment, the target operation instruction and the information of the corresponding target pattern element are cancelled according to the cancellation instruction, and the cancelled target operation instruction and the information of the corresponding target pattern element can be restored according to the restoration operation instruction, so that the restoration of the pattern editing cancellation operation is realized, the defect that only the cancellation can be realized but the cancellation operation cannot be restored in the prior art is overcome, and the editing efficiency and the user experience are improved. Moreover, when the number of the target pattern elements is multiple, the multiple target operation instructions and the corresponding information of the multiple target pattern elements can be cancelled according to the second sequence, and the cancelled multiple target operation instructions and the corresponding information of the multiple target pattern elements can be restored according to the first sequence, so that the multiple cancelling and restoring are realized, the editing efficiency is further improved, and the user experience is greatly improved. In addition, in the process of canceling and restoring, only the information of the canceled part is recorded, so that the recorded content is ensured to be as small as possible, and the memory space of the pattern machine is saved. Meanwhile, by editing the linked list storing the information of the pattern elements, the pattern elements stored in the finally edited linked list can form a pattern meeting the requirements, and the linked list can be used as a sample plate to be directly used by other pattern machines, so that convenience is provided for users.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of pattern editing, comprising:
receiving a canceling instruction for a target pattern element in pattern editing, and executing canceling operation of the target pattern element according to the canceling instruction, wherein the pattern editing comprises a plurality of pattern elements which are edited according to operation instructions and have a first sequence, and each pattern element corresponds to one operation instruction; the target pattern elements are one or more of the edited pattern elements;
storing a target operation instruction corresponding to the information of the target pattern element in a first storage area;
receiving a reduction operation instruction aiming at the target pattern element;
and acquiring the target operation instruction from the first storage area according to the reduction operation instruction, and executing reduction operation of the target pattern element according to the target operation instruction so as to reduce the target pattern element in the pattern editing.
2. The method according to claim 1, wherein, if the number of the target pattern elements is plural, the performing of the restoring operation of the target pattern elements according to the target operation command includes:
and executing the restoration operation of the plurality of target pattern elements according to the target operation commands according to the first sequence.
3. A method according to claim 2, wherein storing a target operation instruction corresponding to the information of the target pattern element in a first storage area comprises:
sequentially storing the target operation instructions corresponding to the information of each target pattern element in a first-in-first-out stack structure according to a second sequence, wherein the second sequence is opposite to the first sequence;
the acquiring the target operation instruction from the first storage area comprises:
and sequentially acquiring each target operation instruction from the stack structure according to the first sequence.
4. The method according to claim 1, further comprising, after restoring said target pattern element in said pattern edit:
receiving a confirmation instruction aiming at the reduction operation instruction;
and deleting the target operation instruction in the first storage area according to the confirmation instruction.
5. The method according to any one of claims 1 to 4, further comprising, before receiving an instruction to undo a target step of pattern editing:
executing editing operation according to the operation instruction, and correspondingly generating a first linked list, wherein the first linked list comprises information of a plurality of pattern elements with a first sequence;
after receiving an instruction for canceling a target pattern element in pattern editing and before receiving an instruction for restoring the target pattern element, the method further comprises the following steps:
deleting the information of the target pattern elements in the first linked list;
after receiving a reduction operation instruction for the target pattern element, the method further comprises the following steps:
and restoring the information of the target pattern element in the first linked list.
6. An apparatus for pattern editing, comprising:
the pattern editing device comprises a first receiving module, a second receiving module and a display module, wherein the first receiving module is used for receiving a cancel instruction for a target pattern element in pattern editing, the pattern editing comprises a plurality of pattern elements which are edited according to an operation instruction and have a first sequence, and each pattern element corresponds to one operation instruction; the target pattern elements are one or more of the edited pattern elements;
the processing module is used for executing the canceling operation of the target pattern element according to the canceling instruction;
the storage module is used for storing a target operation instruction corresponding to the information of the target pattern element in a first storage area;
the second receiving module is used for receiving a reduction operation instruction aiming at the target pattern element;
the acquisition module is used for acquiring the target operation instruction from the first storage area according to the restoration operation instruction;
and the first restoring module is used for executing the restoring operation of the target pattern element according to the target operation instruction so as to restore the target pattern element in the pattern editing.
7. The apparatus according to claim 6, wherein if there are a plurality of target pattern elements, the first restoring module is specifically configured to:
and executing the restoration operation of the plurality of target pattern elements according to the target operation commands according to the first sequence.
8. The apparatus of claim 7, wherein the storage module is specifically configured to: sequentially storing the target operation instructions corresponding to the information of each target pattern element in a first-in-first-out stack structure according to a second sequence, wherein the second sequence is opposite to the first sequence;
the acquisition module is specifically configured to: and sequentially acquiring each target operation instruction from the stack structure according to the first sequence.
9. The apparatus of claim 6, further comprising a first deletion module to:
receiving a confirmation instruction aiming at the reduction operation instruction;
and deleting the target operation instruction in the first storage area according to the confirmation instruction.
10. The apparatus of any one of claims 6-9, further comprising:
the first editing module is used for executing editing operation according to the operation instruction and correspondingly generating a first linked list, wherein the first linked list comprises information of a plurality of pattern elements with a first sequence;
the second deleting module is used for deleting the information of the target pattern elements in the first linked list;
and the second restoring module is used for restoring the information of the target pattern element in the first linked list.
CN201710036392.0A 2017-01-17 2017-01-17 Pattern editing method and device Active CN108315879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710036392.0A CN108315879B (en) 2017-01-17 2017-01-17 Pattern editing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710036392.0A CN108315879B (en) 2017-01-17 2017-01-17 Pattern editing method and device

Publications (2)

Publication Number Publication Date
CN108315879A CN108315879A (en) 2018-07-24
CN108315879B true CN108315879B (en) 2021-01-29

Family

ID=62892013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710036392.0A Active CN108315879B (en) 2017-01-17 2017-01-17 Pattern editing method and device

Country Status (1)

Country Link
CN (1) CN108315879B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113235230A (en) * 2021-04-24 2021-08-10 深圳市星火数控技术有限公司 Servo sewing machine control method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1115809A (en) * 1994-02-03 1996-01-31 兄弟工业株式会社 Sewing data modifying apparatus
JP2007282779A (en) * 2006-04-14 2007-11-01 Juki Corp Method and device of preparing sewing data
CN101287190A (en) * 2007-04-12 2008-10-15 德信无线通讯科技(北京)有限公司 Restoring method for data in mobile phone
JP4399806B2 (en) * 2005-01-27 2010-01-20 ブラザー工業株式会社 Compound data processing device
CN102634934A (en) * 2012-04-19 2012-08-15 南京理工大学常熟研究院有限公司 Control system for ARM-based embedded electronic pattern machine
CN103046236A (en) * 2011-10-14 2013-04-17 曾贤长 Method and device for pattern control of sewing machine
CN105868057A (en) * 2016-06-20 2016-08-17 珠海市魅族科技有限公司 Data processing method and device as well as mobile terminal
CN105986367A (en) * 2014-09-04 2016-10-05 蛇目缝纫机工业株式会社 Sewing machine system, terminal device, and method of synchronizing embroidery data in sewing machine system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1115809A (en) * 1994-02-03 1996-01-31 兄弟工业株式会社 Sewing data modifying apparatus
JP4399806B2 (en) * 2005-01-27 2010-01-20 ブラザー工業株式会社 Compound data processing device
JP2007282779A (en) * 2006-04-14 2007-11-01 Juki Corp Method and device of preparing sewing data
CN101287190A (en) * 2007-04-12 2008-10-15 德信无线通讯科技(北京)有限公司 Restoring method for data in mobile phone
CN103046236A (en) * 2011-10-14 2013-04-17 曾贤长 Method and device for pattern control of sewing machine
CN102634934A (en) * 2012-04-19 2012-08-15 南京理工大学常熟研究院有限公司 Control system for ARM-based embedded electronic pattern machine
CN105986367A (en) * 2014-09-04 2016-10-05 蛇目缝纫机工业株式会社 Sewing machine system, terminal device, and method of synchronizing embroidery data in sewing machine system
CN105868057A (en) * 2016-06-20 2016-08-17 珠海市魅族科技有限公司 Data processing method and device as well as mobile terminal

Also Published As

Publication number Publication date
CN108315879A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN105045663B (en) The method and system of rapid deployment virtual machine
CN110868631A (en) Video editing method, device, terminal and storage medium
CN105302784A (en) Method and system for copying/ cutting and pasting data
FR2552566A1 (en) APPARATUS FOR RECORDING DATA RELATING TO KNITTING PATTERNS FOR THE CONTROL OF A KNITTED KNITTING MACHINE
US8813664B2 (en) Controller, computer readable medium storing control program, and sewing machine
CN107924397B (en) File editing method and file editor
CN108315879B (en) Pattern editing method and device
CN110387635A (en) Hosiery machine and its flower pattern weaving method and storage medium
CN110162260A (en) File batch processing method, device, computer equipment and storage medium
CN103382621B (en) A kind of computer flat machine control device, system and method
JP2014102815A (en) Display terminal device, display screen sharing system, and display screen sharing method
CN102968259B (en) The method and device of execution program
CN105100283A (en) Method and device for realizing playlist synchronization of terminals
US8302071B2 (en) Method of automatic pattern based editing of business models
KR102144351B1 (en) Electronic terminal device supporting easy undo processing of electronic document and operating method thereof
JP2014010501A (en) Teaching data editing system and program
CN112632930B (en) Table data control method and device
CN115426520A (en) Method, device and equipment for arranging live scenes in live broadcast room
US9650733B2 (en) System and method for creating embroidered decorative articles
US20190369820A1 (en) Supporting device
JP4967413B2 (en) CAD system
CN104679526A (en) Maya animation pose library
US8733261B2 (en) Apparatus and non-transitory computer-readable medium
JP6780392B2 (en) Information processing equipment and information processing programs
JP3953738B2 (en) Graphic editing device and recording medium storing program for functioning as graphic editing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant