Method, apparatus, and device for processing pattern files

By encrypting the first password data in the pattern file with a preset key, and combining the encrypted pattern information and the first password data into a pattern file, the problem of poor security of the pattern file is solved, and higher security and anti-theft effect is achieved.

CN114239008BActive Publication Date: 2025-06-13ZHUJI XINGDAHAO SCI & TECH DEV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111443337.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-06-13
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Existing pattern files are poorly secure and are easily stolen and tampered with.

Method used

By encrypting the first password data using a preset key, the first password data is obtained, and the encrypted pattern information and the first password data are combined into a pattern file. When using pattern files, double decryption is required to obtain pattern information.

Benefits of technology

Improve the security of pattern files and prevent pattern information from being changed and stolen at will.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239008B_ABST
    Figure CN114239008B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, and device for processing a pattern file. The pattern file includes pattern data and first cipher data. The first cipher data is obtained by encrypting a first password using a preset key, and the pattern data is obtained by encrypting pattern information using the first password. After receiving an open instruction for the pattern file, the first cipher data is decrypted using the preset key to obtain the first password, and the pattern data is decrypted according to the first password to obtain the pattern information, and then the pattern information is displayed on the user terminal. In this process, the user terminal needs to decrypt the first cipher data to obtain the first password and decrypt the pattern data according to the first password to obtain the pattern information, that is, double decryption is required to obtain the pattern information, which improves the security of the pattern file and prevents the pattern information from being randomly modified and misappropriated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of embroidery technology, and in particular, to a method, apparatus, and device for processing pattern files. Background Art

[0002] The pattern file of an embroidery machine is a file including embroidery data such as stitch data and color change data. The control system of the embroidery machine controls the actuator of the embroidery machine to embroider on the fabric according to the data in the pattern file.

[0003] The file format of the existing pattern file is open, that is, anyone can parse and run it on an embroidery machine or a computer after obtaining the pattern file, so that the embroidery machine can embroider patterns on the fabric; moreover, anyone can edit and modify the pattern file, resulting in poor security of the pattern file, which is easily stolen and tampered with. Summary of the Invention

[0004] Embodiments of this application provide a method, apparatus, and device for processing pattern files, which are used to solve the technical problem that the existing pattern files have poor security and are easily stolen and tampered with.

[0005] In a first aspect, an embodiment of this application provides a method for processing a pattern file. The method includes:

[0006] Receiving an open instruction for a pattern file; wherein, the pattern file includes pattern data and first password data, the first password data is obtained by encrypting a first password using a preset key, and the pattern data is obtained by encrypting pattern information using the first password, and the pattern information is used to indicate the pattern embroidered by the embroidery machine;

[0007] Decrypting the first password data using the preset key to obtain the first password;

[0008] Decrypting the pattern data according to the first password to obtain the pattern information;

[0009] Displaying the pattern information.

[0010] In a possible implementation manner, the decrypting the pattern data according to the first password to obtain the pattern information includes:

[0011] Reading a local configuration file;

[0012] If the local configuration file is read, decrypting the local configuration file using the preset key to obtain a second password;

[0013] Decrypting the pattern data according to the first password and the second password to obtain the pattern information.

[0014] In a possible implementation, decrypting the pattern data according to the first password and the second password to obtain the pattern information includes:

[0015] If the first password and the second password are the same, use the first password to decrypt the pattern data to obtain the pattern information.

[0016] In a possible implementation, decrypting the pattern data according to the first password to obtain the pattern information includes:

[0017] If the first password and the second password are different, or the local configuration file is not read, output a first prompt message for indicating to input the password of the pattern file;

[0018] Receive a third password input by the user;

[0019] If the first password and the third password are the same, use the first password to decrypt the pattern data to obtain the pattern information;

[0020] If the first password and the third password are different, output the first prompt message again until the third password input by the user is the same as the first password, or the number of times the user inputs the third password reaches a preset number of times.

[0021] In a possible implementation, if the number of times the user inputs the third password reaches the preset number of times, the method further includes:

[0022] Output a second prompt message for indicating that the pattern file fails to be opened.

[0023] In a possible implementation, before receiving an open instruction for the pattern file, it further includes:

[0024] Obtain the first password;

[0025] Encrypt the pattern information with the first password to obtain the pattern data;

[0026] Generate the pattern file using the pattern data and the first password data.

[0027] In a possible implementation, obtaining the first password includes:

[0028] Decrypt the first password data with the preset key to obtain the first password.

[0029] In a possible implementation, obtaining the first password includes:

[0030] Receiving the first password input by the user;

[0031] Before generating the pattern file using the pattern data and the first password data, it further includes:

[0032] Encrypting the first password with the preset key to obtain the first password data.

[0033] In a possible implementation, before encrypting the pattern information with the first password to obtain the pattern data, it further includes:

[0034] Generating the pattern information.

[0035] In a second aspect, an embodiment of the present application provides a method for processing a pattern file, the method including:

[0036] Obtaining a first password;

[0037] Encrypting the pattern information with the first password to obtain pattern data;

[0038] Using the pattern data and the first password data to generate a pattern file, where the first password data is obtained by encrypting the first password with a preset key;

[0039] Outputting the pattern file.

[0040] In a possible implementation, obtaining the first password includes:

[0041] Decrypting the first password data with a preset key to obtain the first password.

[0042] In a possible implementation, obtaining the first password includes:

[0043] Receiving the first password input by the user;

[0044] Before using the pattern data and the first password data to generate the pattern file, it further includes:

[0045] Encrypting the first password with a preset key to obtain the first password data.

[0046] In a possible implementation, before encrypting the pattern information with the first password to obtain the pattern data, it further includes:

[0047] Generating the pattern information.

[0048] In a third aspect, an embodiment of the present application provides a processing device for pattern files, including a receiving module, a first decryption module, a second decryption module, and a display module, where:

[0049] The receiving module is configured to receive an open instruction for a pattern file, where the pattern file includes pattern data and first password data, the first password data is obtained by encrypting a first password with a preset key, the pattern data is obtained by encrypting pattern information with the first password, and the pattern information is used to indicate the pattern embroidered by an embroidery machine;

[0050] The first decryption module is configured to decrypt the first password data with the preset key to obtain the first password;

[0051] The second decryption module is configured to decrypt the pattern data according to the first password to obtain the pattern information;

[0052] The display module is configured to display the pattern information.

[0053] In a possible implementation, the second decryption module is specifically configured to

[0054] Read a local configuration file;

[0055] If the local configuration file is read, decrypt the local configuration file with the preset key to obtain a second password;

[0056] Decrypt the pattern data according to the first password and the second password to obtain the pattern information.

[0057] In a possible implementation, the second decryption module is specifically configured to, if the first password and the second password are the same, use the first password to decrypt the pattern data to obtain the pattern information.

[0058] In a possible implementation, the second decryption module is specifically configured to

[0059] If the first password and the second password are different, or the local configuration file is not read, output a first prompt message for indicating to input the password of the pattern file;

[0060] Receive a third password input by the user;

[0061] If the first password and the third password are the same, use the first password to decrypt the pattern data to obtain the pattern information;

[0062] If the first password is different from the third password, the first prompt message is output again until the third password input by the user is the same as the first password or the number of times the user inputs the third password reaches a preset number of times.

[0063] In a possible implementation, the device further includes a second output module, and the second output module is configured to output a second prompt message if the number of times the user inputs the third password reaches the preset number of times, where the second prompt message is used to indicate that the pattern file fails to be opened.

[0064] In a possible implementation, the device further includes a second acquisition module, a second encryption module, and a second generation module;

[0065] The second acquisition module is configured to acquire the first password;

[0066] The second encryption module is configured to encrypt the pattern information with the first password to obtain the pattern data;

[0067] The second generation module is configured to generate the pattern file by using the pattern data and the first password data.

[0068] In a possible implementation, the second acquisition module is specifically configured to decrypt the first password data with the preset key to obtain the first password.

[0069] In a possible implementation, the second acquisition module is specifically configured to receive the first password input by the user;

[0070] Encrypt the first password with the preset key to obtain the first password data.

[0071] In a possible implementation, the second generation module is further configured to generate the pattern information.

[0072] In a fourth aspect, an embodiment of the present application provides a pattern file processing device, including a first acquisition module, a first encryption module, a first generation module, and a first output module; where,

[0073] The first acquisition module is configured to acquire a first password;

[0074] The first encryption module is configured to encrypt pattern information with the first password to obtain pattern data

[0075] The first generation module is configured to generate a pattern file by using the pattern data and first password data, where the first password data is obtained by encrypting the first password with a preset key, and the first output module is configured to output the pattern file.

[0076] In a possible implementation, the first acquisition module is specifically configured to decrypt the first password data by using a preset key to obtain a first password.

[0077] In a possible implementation, the first acquisition module is specifically configured to

[0078] receive a first password input by a user;

[0079] Before generating the pattern file by using the pattern data and the first password data, the method further includes:

[0080] encrypt the first password by using a preset key to obtain the first password data.

[0081] In a possible implementation, the first generation module is specifically configured to generate the pattern information.

[0082] In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory, where the memory stores a computer program;

[0083] The processor executes the computer program stored in the memory, so that the processor executes the pattern file processing method as described in the first aspect and various possible designs of the first aspect, or the pattern file processing method as described in the second aspect and various possible designs of the second aspect.

[0084] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the pattern file processing method as described in the first aspect and various possible designs of the first aspect, or the pattern file processing method as described in the second aspect and various possible designs of the second aspect.

[0085] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the processor executes the computer program, it implements the pattern file processing method as described in the first aspect and various possible designs of the first aspect, or the pattern file processing method as described in the second aspect and various possible designs of the second aspect.

[0086] The method, apparatus, and device for processing a pattern file provided by an embodiment of the present application, where the pattern file includes pattern data and first password data, the first password data is obtained by encrypting a first password using a preset key, and the pattern data is obtained by encrypting pattern information using the first password; after receiving an open instruction for the pattern file, decrypt the first password data using the preset key to obtain the first password; and decrypt the pattern data according to the first password to obtain the pattern information; then display the pattern information on the user terminal. In this process, the user terminal needs to decrypt the first password data to obtain the first password and decrypt the pattern data according to the first password to obtain the pattern information, that is, double decryption is required to obtain the pattern information, which improves the security of the pattern file and avoids the pattern information from being randomly changed and misappropriated. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0088] Figure 1 It is a schematic diagram of the application scenario of the method for processing a pattern file provided by an embodiment of the present application;

[0089] Figure 2 It is a schematic flowchart of the method for processing a pattern file provided by an embodiment of the present application;

[0090] Figure 3 It is a schematic flowchart of the method for processing a pattern file provided by another embodiment of the present application;

[0091] Figure 4 It is a schematic flowchart of the method for processing a pattern file provided by yet another embodiment of the present application;

[0092] Figure 5 It is a block diagram of the structure of the apparatus for processing a pattern file provided by an embodiment of the present application;

[0093] Figure 6 It is a block diagram of the structure of the apparatus for processing a pattern file provided by another embodiment of the present application;

[0094] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0095] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0096] During the embroidery process of an embroidery machine, technicians first use embroidery software to design embroidery patterns and generate pattern files, and then the control system of the embroidery machine controls the actuator of the embroidery machine to embroider on the fabric according to the data in the pattern files. Among them, the embroidery files contain embroidery data such as stitch data and color change data. A complex pattern file may take two to three people 20 to 30 working days to complete. Therefore, the pattern file is crucial for an embroidery factory.

[0097] The file format of the existing pattern files is open, such as the DST format or the DSB format. That is, anyone who obtains the pattern file can parse and run it on an embroidery machine or a computer, enabling the embroidery machine to embroider colors on the fabric. Moreover, anyone can edit and modify the pattern file, resulting in poor security of the pattern file and being easily stolen and tampered with.

[0098] In view of this, the embodiments of this application use a first password to encrypt the pattern information to obtain pattern data, so as to improve the security of the pattern information. Moreover, a preset key is used to encrypt the first password to obtain first password data, and the first password data and the pattern data form a pattern file. In this way, when other users use the pattern information, they need to decrypt the first password data and the pattern data twice to obtain the pattern information, improving the security of the pattern file and avoiding the pattern file being stolen and tampered with.

[0099] The method for processing the pattern file provided by the embodiments of this application is applicable to an application scenario, such as Figure 1As shown in the figure, it includes: a first user terminal 101 and a second user terminal 102. Among them, the first user terminal 101 and the second user terminal 102 can be two different electronic devices respectively. The first user terminal 101 and the second user terminal 102 can be communicatively connected to realize the transmission of pattern files; alternatively, the pattern files are transported from the first user terminal 101 to the second user terminal 102 through a storage device such as a USB flash drive. The first user terminal 101 encrypts the pattern information according to the first password obtained from the first password data to obtain pattern data, and the pattern data and the first password data generate a pattern file; after the pattern file is transmitted to the second user terminal 102, the second user terminal 102 decrypts the first password data to obtain the first password; and decrypts the pattern data according to the first password to obtain the pattern information; finally, the pattern information is displayed on the second user terminal 102.

[0100] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0101] Refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for processing a pattern file provided by an embodiment of the present application. The method for processing the pattern file includes:

[0102] S201. Receive an open instruction for the pattern file.

[0103] In the embodiments of the present application, the execution subject can be a computer or the main control system of an embroidery machine. Optionally, the main control system of the embroidery machine can be implemented by software or by a combination of software and hardware.

[0104] Among them, the pattern file includes pattern data and first password data. The first password data is obtained by encrypting the first password with a preset key, and the pattern data is obtained by encrypting the pattern information with the first password. The pattern information is used to indicate the pattern embroidered by the embroidery machine.

[0105] The pattern information includes stitch data, color change data, etc. Each stitch point contains stitch information. Usually, the stitches are divided into flat stitches, jump stitches, gold piece switches, color changes, bead feeding, etc. The embroidery machine performs embroidery operations according to the stitches. A flat stitch means to drop the needle, a jump stitch means not to drop the needle, a gold piece open means that the gold piece device drops to prepare for bead feeding, and bead feeding means to eject the sequins. The embroidery machine has multiple needle bars and can embroider multiple colors of embroidery threads. When switching from one needle bar to another, it is called a color change.

[0106] Generally, technicians need to use pattern design software on a computer to design embroidery patterns. For example, use emCAD to design embroidery patterns and output pattern files in DHA format.

[0107] The user inputs an open instruction for the pattern file through the input devices of the computer, such as a keyboard and a mouse. Exemplarily, after selecting the pattern file, double-click the left button of the mouse to input an open instruction for the pattern file. Or, the user inputs an open instruction for the pattern file through the control panel of the embroidery machine, such as buttons or a touch screen, etc. The control device of the computer or the embroidery machine receives the open instruction for the pattern file through the input device.

[0108] S202. Decrypt the first password data with the preset key to obtain the first password.

[0109] Among them, the preset key is set in advance. For example, when the software for designing or opening pattern information is used for the first time, the user configures the preset key. The specific method for decrypting the first password data with the preset key is not limited. For example, those skilled in the art can use the preset key and the DES (Data Encryption Standard) algorithm to decrypt the first password data to obtain the first password.

[0110] The first password can be a pure digital password. For example, a nine-digit number; the first password can also be a combination of numbers and letters, and the embodiments of the present application do not limit this.

[0111] S203. Decrypt the pattern data according to the first password to obtain the pattern information.

[0112] For example, use the first password as the key to decrypt the pattern data to obtain the pattern information. The specific method for decrypting the pattern data is not limited. For example, the embodiments of the present application can use the first password as the key and the DES algorithm to decrypt the first password data to obtain the pattern information.

[0113] S204. Display the pattern information.

[0114] Display the pattern information on the display screen of the computer so that the user can modify and save the pattern information. Or display the pattern information on the embroidery machine so that the embroidery machine can control the actuator to embroider according to the pattern information.

[0115] The method for processing a pattern file provided by an embodiment of the present application, wherein the pattern file includes pattern data and first cipher data, the first cipher data is obtained by encrypting a first cipher with a preset key, and the pattern data is obtained by encrypting pattern information with the first cipher; after receiving an open instruction for the pattern file, decrypt the first cipher data with the preset key to obtain the first cipher; and decrypt the pattern data according to the first cipher to obtain pattern information; then display the pattern information on the user terminal. In this process, the user terminal needs to decrypt the first cipher data to obtain the first cipher and decrypt the pattern data according to the first cipher to obtain the pattern information, that is, double decryption is required to obtain the pattern information, which improves the security of the pattern file and prevents the pattern information from being randomly changed or stolen.

[0116] Based on the embodiment shown in Figure 2 , the following further elaborates on the method for processing a pattern file in conjunction with Figure 3 .

[0117] Figure 3 The flowchart of the method for processing a pattern file provided by another embodiment of the present application is shown. Please refer to Figure 3 . The method includes:

[0118] S301. Receive an open instruction for the pattern file.

[0119] It should be noted that the execution process of step S301 can refer to the execution process of S201, and will not be elaborated here.

[0120] S302. Decrypt the first cipher data with the preset key to obtain the first cipher.

[0121] It should be noted that the execution process of step S302 can refer to the execution process of S202, and will not be elaborated here.

[0122] S303. Read the local configuration file.

[0123] Among them, the local configuration file is a set of settings and files for the pattern design software to load the required environment for the user when the user first opens the pattern design software.

[0124] Generally, the local configuration file is stored in a preset location. When the user terminal finds the local configuration file at the preset location, it means that the local configuration file has been read, and then step S304 is executed; when the user terminal does not find the local configuration file at the preset location, it means that the local configuration file has not been read, and then step S308 is executed.

[0125] In some implementations, the local configuration file may be set in the following manner: receiving a second password input by a user, encrypting the second password with a preset key, and obtaining the local configuration file.

[0126] S304: Decrypt the local configuration file using the preset key to obtain a second password.

[0127] The preset key is pre-set when setting the local configuration file, for example, the key configured by the user when using or opening the pattern design software for the first time. The specific method of decrypting the second password data using the preset key is not limited. For example, those skilled in the art can use the preset key and the DES (Data Encryption Standard) algorithm to decrypt the local configuration file to obtain the second password.

[0128] The second password may be a pure numeric password, for example, eight digits; the second password may also be a combination of numbers and letters, which is not limited in the embodiments of the present application.

[0129] According to the first password and the second password, the pattern data is decrypted to obtain the pattern information. For example, there is a mapping relationship between the first password and the second password, and the decryption key is determined through the mapping relationship to decrypt the pattern data; for another example, by comparing whether the first password and the second password are the same, the key for decrypting the pattern data is determined. For details, refer to steps S305 to S306.

[0130] S305: Determine whether the first password is the same as the second password.

[0131] The first password and the second password are compared, and if every bit of the first password is the same as the second password, then the first password and the second password are determined to be the same. It can be understood that the first password and the second password have the same number of bits.

[0132] If the first password is the same as the second password, the judgment is "yes", indicating that the second password verification is successful, and step S306 is executed; if the first password is different from the second password, the judgment is "no", indicating that the second password verification fails, and step S308 is executed.

[0133] S306: Use the first password to decrypt the pattern data to obtain the pattern information.

[0134] This step can be understood as, when the second password is the same as the first password, that is, the second password of the user terminal is the same as the first password in the pattern file; or, when the third password input by the user is the same as the first password, the first password is used as a key to decrypt the pattern data and obtain the pattern information, that is, the pattern information is successfully opened so that the pattern information can be displayed on the user terminal.

[0135] Using the first password as the key, decrypt the pattern data to obtain the pattern information. The specific method for decrypting the pattern data is not limited. For example, in the embodiments of the present application, the first password can be used as the key and the DES algorithm can be used to decrypt the first password data to obtain the pattern information.

[0136] S307. Display the pattern information.

[0137] It should be noted that the execution process of step S307 can refer to the execution process of S204, and will not be elaborated here.

[0138] S308. Output the first prompt message.

[0139] When the second password is different from the first password, or when the local configuration file is not read, this step is executed. The first prompt message is used to indicate the password for inputting the pattern file, and the user can input the password for the pattern file according to the first indication message. Specifically, the first indication message can be a password input interface displayed on the display screen of the user terminal to indicate the user to input the password for the pattern file;

[0140] S309. Receive the third password input by the user.

[0141] The user can input the third password through an input device such as a keyboard, and thus receive the third password input by the user through the keyboard. Of course, the user can also connect an external input device to the user terminal, and when the user inputs the third password through the external input device, the user terminal can receive the third password.

[0142] The third password has the same number of digits as the first password. The third password can be only numbers, or a combination of numbers and letters, etc., which is not limited here.

[0143] S310. Determine whether the first password is the same as the third password.

[0144] Compare the first password and the third password. If each digit of the first password is the same as the third password, it is determined that the first password and the third password are the same.

[0145] If the first password is the same as the third password, that is, it is determined as "yes", indicating that the third password verification is successful, then execute step S306; if the first password is different from the third password, that is, it is determined as "no", indicating that the third password verification fails, then execute step S311.

[0146] S311. Output the first prompt message again until the third password input by the user is the same as the first password, or the number of times the user inputs the third password reaches the preset number of times.

[0147] This step can be understood as the processing step after the third password verification fails. In some possible implementation manners, when the first password is different from the third password, the first prompt message is output again until the third password input by the user is the same as the first password.

[0148] In other possible implementation manners, the first prompt message is output again until the number of times the user inputs the third password reaches a preset number of times, such as five times.

[0149] Optionally, when the number of times the user inputs the third password reaches the preset number of times, the method further includes outputting a second prompt message, and the second prompt message is used to indicate that the pattern file fails to be opened. Such a setting is beneficial to further improving the security of the pattern file and avoiding malicious password cracking.

[0150] The pattern file processing method provided by the embodiments of the present application obtains the second password through a local configuration file, and when the second password is the same as the first password, the first password is used to decrypt the pattern data to obtain pattern information; when the local configuration file is not read, by comparing the third password input by the user with the first password, when the third password is the same as the first password, the first password is used to decrypt the pattern data to obtain pattern information, that is, only when the password of the local configuration file is the same as the first password, or when the password input by the user is the same as the first password, can the pattern data be decrypted to obtain pattern information, which improves the security of the pattern file and avoids the pattern file from being stolen or tampered with at will.

[0151] It can be understood that in the embodiments of the present application, a pattern file can be generated on one user terminal and opened and used on another user terminal. For example, the pattern designed by Company A is supplied to Company B for use; or, a pattern file is generated on one user terminal and opened or used on the same user terminal. For example, after Company A designs a pattern file, the pattern file is modified again. Before opening or using the pattern file, the pattern file needs to be generated first.

[0152] The following Figure 4 , further details the generation of the pattern file. Among them, Figure 4 is a schematic flowchart of the pattern file processing method provided by another embodiment of the present application. Please refer to Figure 4 , this method includes:

[0153] S401. Receive the first password input by the user.

[0154] The user can input the first password through an input device such as a keyboard, so that the user terminal receives the first password input by the user through the keyboard. Of course, the user can also connect an external input device to the user terminal. When the user inputs the first password through the external input device, the user terminal can receive the first password.

[0155] S402. Encrypt the first password using the preset key to obtain the first password data.

[0156] The preset key is set in advance. For example, when the computer is used for the first time or the pattern design software is opened, the key configured by the user. The specific method for encrypting the first password using the preset key is not limited. For example, a symmetric encryption algorithm such as the DES algorithm can be used, or an asymmetric encryption algorithm for public key encryption can be used, or a one-way encryption algorithm can also be used.

[0157] It can be understood that steps S401 and S402 are steps for forming the first password data. The first password data can be stored as a configuration file for convenient subsequent use. Optionally, the first password data is stored as a configuration file in the same directory as the pattern design software.

[0158] S403. Generate the pattern information.

[0159] Use the pattern design software to design and generate pattern information. Exemplarily, use emCAD to design stitch patterns, color changes, etc. to generate pattern information.

[0160] S404. Decrypt the first password data using the preset key to obtain the first password.

[0161] It should be noted that the execution process of step S404 can refer to the execution process of S202 and will not be elaborated here.

[0162] S405. Encrypt the pattern information using the first password to obtain the pattern data.

[0163] The specific method for encrypting the pattern information using the first password is not limited. For example, a symmetric encryption algorithm such as the DES algorithm can be used, or an asymmetric encryption algorithm for public key encryption can be used, or a one-way encryption algorithm can also be used.

[0164] S406. Use the pattern data and the first password data to generate a pattern file.

[0165] Exemplarily, store the pattern data and the first password data in the same directory to generate a pattern file; or, form a compressed package of the pattern data and the first password data to generate a pattern file.

[0166] S407. Output the pattern file.

[0167] Optionally, the pattern file is stored in a preset file of the user terminal. Alternatively, the pattern file is output to another user terminal. For example, the user terminal is communicatively connected to an embroidery machine, and the pattern file generated at the user terminal is output to the embroidery machine so that the embroidery machine can embroider according to the pattern information.

[0168] In the method for processing a pattern file provided in an embodiment of the present application, a preset key is used to encrypt a first password to form first password data, and the first password is used to encrypt pattern information to obtain pattern data. The pattern data and the first password data are used to generate a pattern file, so that the pattern file is double encrypted, improving the security of the pattern file; thus, after the pattern file is output, double decryption is required to obtain the pattern information, effectively avoiding the theft and random tampering of the pattern file.

[0169] Figure 5 It is a structural block diagram of a pattern file processing device provided in an embodiment of the present application. The pattern file processing device 500 can be set in an electronic device, such as a user computer terminal or an embroidery machine. Please refer to Figure 5 , the pattern file processing device 500 includes a receiving module 501, a first decryption module 502, a second decryption module 503, and a display module 504, where:

[0170] The receiving module 501 is configured to receive an open instruction for a pattern file, where the pattern file includes pattern data and first password data, the first password data is obtained by encrypting a first password with a preset key, and the pattern data is obtained by encrypting pattern information with the first password, and the pattern information is used to indicate the pattern embroidered by the embroidery machine;

[0171] The first decryption module 502 is configured to decrypt the first password data with a preset key to obtain a first password;

[0172] The second decryption module 503 is configured to decrypt the pattern data according to the first password to obtain the pattern information;

[0173] The display module 504 is configured to display the pattern information.

[0174] In a possible implementation manner, the second decryption module 503 is specifically configured to

[0175] Read a local configuration file;

[0176] If the local configuration file is read, decrypt the local configuration file with the preset key to obtain a second password;

[0177] Decrypt the pattern data according to the first password and the second password to obtain the pattern information.

[0178] In a possible implementation manner, the second decryption module 503 is specifically configured to, if the first password and the second password are the same, use the first password to decrypt the pattern data to obtain the pattern information.

[0179] In a possible implementation manner, the second decryption module 503 is specifically configured to

[0180] if the first password and the second password are different, or the local configuration file is not read, output a first prompt message, where the first prompt message is used to indicate inputting the password of the pattern file;

[0181] Receive a third password input by the user;

[0182] if the first password and the third password are the same, use the first password to decrypt the pattern data to obtain the pattern information;

[0183] if the first password and the third password are different, output the first prompt message again until the third password input by the user is the same as the first password, or the number of times the user inputs the third password reaches a preset number of times.

[0184] In a possible implementation manner, the device further includes a second output module, and the second output module is configured to, if the number of times the user inputs the third password reaches the preset number of times, output a second prompt message, where the second prompt message is used to indicate that the pattern file fails to open.

[0185] In a possible implementation manner, the device further includes a second acquisition module, a second encryption module, and a second generation module;

[0186] The second acquisition module is configured to acquire the first password;

[0187] The second encryption module is configured to encrypt the pattern information with the first password to obtain the pattern data;

[0188] The second generation module is configured to generate the pattern file using the pattern data and the first password data.

[0189] In a possible implementation manner, the second acquisition module is specifically configured to decrypt the first password data with the preset key to obtain the first password.

[0190] In a possible implementation manner, the second acquisition module is specifically configured to receive the first password input by the user;

[0191] Encrypt the first password with the preset key to obtain the first password data.

[0192] In a possible implementation, the second generation module is further configured to generate the pattern information.

[0193] The pattern file processing device provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and the principles and beneficial effects are similar, and will not be elaborated here.

[0194] Figure 6 It is a structural block diagram of a pattern file processing device provided by another embodiment of the present application. The pattern file processing device 600 can be set in an electronic device, such as a user computer terminal or an embroidery machine. Please refer to Figure 6 The pattern file processing device 600 includes a first acquisition module 601, a first encryption module 602, a first generation module 603, and a first output module 604; wherein,

[0195] The first acquisition module 601 is configured to acquire a first password;

[0196] The first encryption module 602 is configured to encrypt the pattern information with the first password to obtain pattern data

[0197] The first generation module 603 is configured to generate a pattern file using the pattern data and the first password data, and the first password data is obtained by encrypting the first password with a preset key. The first output module 604 is configured to output the pattern file.

[0198] In a possible implementation, the first acquisition module 601 is specifically configured to decrypt the first password data with a preset key to obtain the first password.

[0199] In a possible implementation, the first acquisition module 601 is specifically configured to

[0200] Receive the first password input by the user;

[0201] Before using the pattern data and the first password data to generate the pattern file, it further includes:

[0202] Encrypt the first password with a preset key to obtain the first password data.

[0203] In a possible implementation, the first generation module 603 is specifically configured to generate the pattern information.

[0204] The processing device for pattern files provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments, and the principles and beneficial effects are similar, so they will not be elaborated here.

[0205] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided by the embodiments of the present application. Please refer to Figure 7 , the electronic device 700 may include: a processor 701 and a memory 702. Among them, the processor 701 and the memory 702 can communicate; exemplarily, the processor 701 and the memory 702 communicate through a communication bus 703. The memory 702 is used to store a computer program, and the processor 701 is used to call the computer program in the memory 702 to execute the processing method of the pattern file shown in any of the above method embodiments.

[0206] Optionally, the electronic device 700 may further include a communication interface, and the communication interface may include a transmitter and / or a receiver.

[0207] Optionally, the above-mentioned processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0208] The electronic device provided by the embodiments of the present application may be a computer, an embroidery machine, etc.

[0209] The embodiments of the present application provide a computer-readable storage medium, on which computer-executable instructions are stored; when the computer-executable instructions are executed by a processor, they are used to implement the processing method of the pattern file as described in any of the above embodiments.

[0210] The embodiments of the present application provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the processing method of the pattern file as described in any of the above embodiments.

[0211] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0212] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0213] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional units.

[0214] The above integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium. The above software functional units stored in a storage medium include several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0215] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the foregoing method embodiment and will not be elaborated here.

[0216] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing pattern files, characterized in that, it is applied to an embroidery machine, and the embroidery machine is communicatively connected to a user terminal. The method includes: Receiving an open instruction for a pattern file; wherein, the pattern file includes pattern data and first password data, the first password data is obtained by encrypting a first password using a preset key, the pattern data is obtained by encrypting pattern information using the first password, the pattern information is used to indicate the pattern embroidered by the embroidery machine, and the preset key is pre-set by the user terminal; Decrypting the first password data using the preset key to obtain the first password; According to the first password, decrypting the pattern data to obtain the pattern information; Displaying the pattern information on the embroidery machine so that the embroidery machine controls an actuator to embroider according to the pattern information; The step of decrypting the pattern data according to the first password to obtain the pattern information includes: Reading a local configuration file, wherein the local configuration file is a set of settings and files for the pattern design software to load the required environment for the user when the user first opens the pattern design software; If the local configuration file is read, decrypting the local configuration file using the preset key to obtain a second password; According to the first password and the second password, decrypting the pattern data to obtain the pattern information.

2. The method according to claim 1, characterized in that, the step of decrypting the pattern data according to the first password and the second password to obtain the pattern information includes: If the first password and the second password are the same, using the first password to decrypt the pattern data to obtain the pattern information.

3. The method according to claim 1, characterized in that, the step of decrypting the pattern data according to the first password to obtain the pattern information includes: If the first password and the second password are different, or the local configuration file is not read, outputting a first prompt message, the first prompt message is used to indicate inputting the password of the pattern file; Receiving a third password input by the user; If the first password and the third password are the same, using the first password to decrypt the pattern data to obtain the pattern information; If the first password and the third password are different, outputting the first prompt message again until the third password input by the user is the same as the first password, or the number of times the user inputs the third password reaches a preset number of times.

4. The method according to claim 3, characterized in that, if the number of times the user inputs the third password reaches the preset number of times, the method further includes: Outputting a second prompt message, the second prompt message is used to indicate that the pattern file fails to open.

5. The method according to any one of claims 1-4, characterized in that, before receiving the open instruction for the pattern file, it further includes: Obtaining the first password; Encrypting the pattern information using the first password to obtain the pattern data; Generate the pattern file by using the pattern data and the first password data.

6. The method according to claim 5, wherein, the obtaining of the first password includes: Decrypt the first password data by using the preset key to obtain the first password.

7. The method according to claim 6, wherein, the obtaining of the first password includes: Receiving the first password input by the user; Before generating the pattern file by using the pattern data and the first password data, it further includes: Encrypt the first password by using the preset key to obtain the first password data.

8. The method according to claim 7, wherein, Before encrypting the pattern information by using the first password to obtain the pattern data, it further includes: Generate the pattern information.

9. A method for processing a pattern file, which is applied to a user terminal, and the user terminal is communicatively connected to an embroidery machine, wherein, the method includes: Obtain a first password; Encrypt the pattern information by using the first password to obtain pattern data; Generate a pattern file by using the pattern data and the first password data, where the first password data is obtained by encrypting the first password by using a preset key, and the preset key is pre-set by the user terminal; Output the pattern file and send it to the embroidery machine, so that the embroidery machine decrypts the first password by using the preset key to obtain the first password, decrypts the pattern data by using the first password to obtain the pattern information, and controls the actuator to embroider based on the pattern information; Wherein, decrypting the pattern data by using the first password to obtain the pattern information includes: reading a local configuration file, where the local configuration file is a set of settings and files for the pattern design software to load the required environment for the user when the user first opens the pattern design software; if the local configuration file is read, decrypt the local configuration file by using the preset key to obtain a second password; decrypt the pattern data by using the first password and the second password to obtain the pattern information.

10. The method according to claim 9, wherein, the obtaining of the first password includes: Receiving the first password input by the user; Before generating the pattern file by using the pattern data and the first password data, it further includes: Encrypt the first password by using the preset key to obtain the first password data.

11. The method according to any one of claims 9-10, wherein, Before encrypting the pattern information by using the first password to obtain the pattern data, it further includes: Generate the pattern information.

12. A device for processing a pattern file, wherein, it is applied to an embroidery machine, the embroidery machine is communicatively connected to a user terminal, and the device includes a receiving module, a first decryption module, a second decryption module and a display module; The receiving module is configured to receive an open instruction for a pattern file. The pattern file includes pattern data and first cipher data, where the first cipher data is obtained by encrypting a first password using a preset key, the pattern data is obtained by encrypting pattern information using the first password, the pattern information is used to indicate the pattern embroidered by the embroidery machine, and the preset key is pre-set by the user terminal; The first decryption module is configured to decrypt the first cipher data using the preset key to obtain the first password; The second decryption module is configured to decrypt the pattern data according to the first password to obtain the pattern information; The display module is configured to display the pattern information so that the embroidery machine controls the actuator to embroider according to the pattern information; The second decryption module is specifically configured to read a local configuration file, where the local configuration file is a set of settings and files for the pattern design software to load the required environment when the user first opens the pattern design software; If the local configuration file is read, the preset key is used to decrypt the local configuration file to obtain a second password; The pattern data is decrypted according to the first password and the second password to obtain the pattern information.

13. A processing device for a pattern file, characterized in that, applied to a user terminal, the user terminal is communicatively connected to an embroidery machine, and the device includes a first acquisition module, a first encryption module, a first generation module, and a first output module; The first acquisition module is configured to acquire a first password; The first encryption module is configured to encrypt pattern information using the first password to obtain pattern data The first generation module is configured to generate a pattern file using the pattern data and first cipher data, where the first cipher data is obtained by encrypting the first password using a preset key, and the preset key is pre-set by the user terminal; The first output module is configured to output the pattern file so that the embroidery machine decrypts the first password using the preset key to obtain the first password, decrypts the pattern data according to the first password to obtain the pattern information, and controls the actuator to embroider based on the pattern information; The first output module is specifically configured to read a local configuration file, where the local configuration file is a set of settings and files for the pattern design software to load the required environment when the user first opens the pattern design software; if the local configuration file is read, the preset key is used to decrypt the local configuration file to obtain a second password; the pattern data is decrypted according to the first password and the second password to obtain the pattern information.

14. An electronic device, characterized in that, comprises: a processor and a memory; The memory is configured to store a computer program; The processor is configured to execute the computer program stored in the memory to implement the method for processing a pattern file according to any one of claims 1 to 8 or claims 9 to 11.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, are used to implement the method for processing a pattern file according to any one of claims 1 to 8 or claims 9 to 11.

16. A computer program product, comprising a computer program, wherein, when the computer program is executed by a processor, it implements the method for processing a pattern file according to any one of claims 1 to 8 or claims 9 to 11.

Citation Information

Patent Citations

  • Illegal use prevention method of pattern band of embroidery machine

    CN104372541A

  • File transmission method and device, equipment and storage medium

    CN113422832A