Remote unlocking method and system for Q-switched laser

By designing a remote unlocking system based on the serial communication module in the Q-tuning laser, the problem of device locking and unlocking is solved, and efficient and secure device encryption/decryption operations are achieved.

CN119892529AActive Publication Date: 2025-04-25WUHAN STRONGEST LASER TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510390467.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-04-25
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

The existing Q-tuning laser lacks wireless communication modules, which makes it difficult to lock and unlock the equipment in special circumstances, and the process of using physical understanding is cumbersome, which increases the cost of the machine.

Method used

A remote unlocking method and system based on the existing serial communication module of Q-tuning laser is designed. Through the coordinated work of the unlocking terminal, the server computer and the laser embedded end, the machine code and the machine key are generated to achieve accurate encryption/decryption operations.

Benefits of technology

Simplifies the encryption/decryption operation of the device, improves the convenience and security of the device, and avoids the situation where a single key unlocks multiple machines. Each laser has different decryption keys per time period.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892529A_ABST
    Figure CN119892529A_ABST
Patent Text Reader

Abstract

The invention provides a remote unlocking method and system for a Q-switched laser, the system comprises an unlocking terminal, a server upper computer and a laser embedding end, and the method comprises the following steps: the unlocking terminal generates a machine code according to an SN code of a laser to be unlocked, equipment information of the unlocking terminal and time information of the unlocking terminal; the server upper computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located; and the unlocking terminal analyzes the machine key, and if the SN code of the current laser, the equipment information of the current unlocking terminal and the current time information are matched with the analyzed information, the laser embedding end unlocks the current laser. According to the invention, unlocking is carried out only by means of software, the decryption operation convenience of the laser is improved, accurate decryption in a limited time period can be realized according to the real-time time of the unlocking terminal and the equipment information, remote one-time-period one-code one-machine decryption is realized, and the decryption precision and security of the laser are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Q-switched laser control, and more specifically, to a remote unlocking method and system for a Q-switched laser. Background Art

[0002] General Q-switched lasers do not have wireless communication modules, and they are sold all over the world and are widely distributed. It is very difficult to control such Q-switched laser equipment to lock under special circumstances and use it only after unlocking. If physical decryption is used, the operation process will be cumbersome and will increase the cost of the machine. If the existing hardware conditions of the Q-switched laser can be fully utilized, such as using the serial communication module that all Q-switched lasers have to lock the software and decrypt it, the device encryption / decryption operation can be easily realized.

[0003] Therefore, it is necessary to design a more accurate and convenient encryption / decryption solution based on the serial communication module of the Q-switched laser. Summary of the invention

[0004] In view of the technical problems existing in the prior art, the present invention provides a remote unlocking method and system for a Q-switched laser, which utilizes the existing serial port communication mode of the device to achieve more accurate encryption / decryption operations, simplify the operation process, and improve the convenience and safety of device operation.

[0005] According to a first aspect of the present invention, a remote unlocking method for a Q-switched laser is provided. The method is implemented based on an unlocking system, wherein the unlocking system includes an unlocking terminal, a server host computer, and a laser embedded end. The method includes: S1, the unlocking terminal generates a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal; S2, the server host computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located; S3, the unlocking terminal parses the machine key. If the SN code of the current laser, the device information of the current unlocking terminal and the current time information match the parsed information, the laser embedding end unlocks the current laser.

[0006] Based on the above technical solution, the present invention can also make the following improvements.

[0007] Optionally, step S1 includes: S101, establishing a communication connection between the embedded end of the laser to be unlocked and the unlocking terminal, querying the SN code of the laser to be unlocked, the device information of the unlocking terminal, and the real-time time information of the unlocking terminal; S102, encrypting the device information of the unlocked terminal to generate a first primary ciphertext; S103, processing the real-time time information of the unlocking terminal to generate a first time key; S104, connecting the first primary ciphertext with the SN code obtained by the query, and encrypting them in combination with the first time key to generate a machine code.

[0008] Optionally, the device information of the unlocking terminal includes multiple items of the IP address, CPU ID, MAC address, and hard disk serial number of the current unlocking terminal.

[0009] Optionally, in S102, encrypting the device information of the unlocked terminal to generate a first primary ciphertext includes: The device information of the unlocked terminal is added to a preset custom character string to form a first character string, and the first character string is encrypted a preset number of times using an encryption tool to generate a first primary ciphertext.

[0010] Optionally, in S103, the processing of the real-time time information of the unlocking terminal to generate a first time key includes: The month, week, and hour in the real-time time information of the unlocked terminal are added, multiplied by the first custom number, and modulo the second custom number to generate a first time key.

[0011] Optionally, step S2 includes: S201, the server host computer generates a second time key according to the real-time time information of the time zone where the unlocking terminal is located in the same manner as the first time key is generated; S202, using the second time key to decrypt the machine code, and judging whether the machine code is correct according to the format of the string obtained by decrypting the machine code: if it is correct, obtaining the encrypted information string of the unlocking terminal and the SN code of the laser from the string obtained by decrypting the machine code; S203, performing calculation processing on the SN code of the laser according to a preset calculation rule; S204, concatenating the encrypted information character string of the unlocking terminal obtained by parsing with the character string obtained by the SN code operation processing, and performing encryption processing in combination with the second time key to generate a machine key.

[0012] Optionally, in S203, the step of performing calculation processing on the SN code of the laser according to a preset calculation rule includes: The last four digits of the decrypted SN code are combined in pairs to form two two-digit numbers, and the two two-digit numbers are calculated with the preset custom number according to the preset calculation rules to obtain the first digital key; The first digital key is compared with a preset value, and the SN code is processed according to the comparison result.

[0013] Optionally, comparing the first digital key with a preset value and processing the SN code according to the comparison result includes: If it is determined that the first digital key is less than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are modulo the first digital key, and all odd-numbered bytes of the SN code decrypted in step S202 are rounded to the integer of the first digital key; If it is determined that the first digital key is greater than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are compared with the first digital key: if the result is greater than, all even-numbered bytes of the SN code decrypted in step S202 are subtracted from the first digital key; if the result is less than, all even-numbered bytes of the SN code decrypted in step S202 are added with the first digital key, and the odd-numbered bytes of the SN code decrypted in step S202 are not processed; The data obtained by comparing the first digital key with the preset value are processed to form a new character string in sequence.

[0014] Optionally, step S3 includes: S301, the unlocking terminal obtains the current time information of the unlocking terminal, and generates a third time key according to the current time information in the same manner as the first time key is generated; S302, using the third time key to decrypt the machine key, and judging whether the current time information matches the time information contained in the machine key according to the string format obtained by decryption: if the result is a match, obtaining the encrypted information string of the unlocking terminal and the encrypted laser SN code from the decryption result of the machine key; if the result is a mismatch, the unlocking fails; S303, obtaining device information of the current unlocking terminal, encrypting the device information of the current unlocking terminal according to the encryption method of the first primary ciphertext, and comparing the encryption result with the encrypted information string of the unlocking terminal obtained from the decryption result of the machine key: if the comparison result is consistent, it is determined that the current unlocking terminal matches successfully, otherwise the unlocking fails; S304, the laser embedding end performs calculation processing on the SN code of the current laser according to the preset calculation rules described in step S203, and compares the processing result with the encrypted laser SN code obtained from the machine key decryption result: if the comparison result is consistent, it is determined that the SN code of the current laser matches successfully and the current laser is unlocked; otherwise, the unlocking fails.

[0015] According to a second aspect of the present invention, a remote unlocking system for a Q-switched laser is provided, comprising a laser embedded end, an unlocking terminal and a server host computer, wherein the laser embedded end is communicatively connected to the unlocking terminal, and the unlocking terminal is communicatively connected to the server host computer, wherein: The laser embedding end is used to pre-store the SN code of the corresponding laser and control the corresponding laser; The unlocking terminal is used to query the laser embedding end for the SN code of the laser to be unlocked, and generate a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal; The server host computer is used to generate a machine key according to the machine code and the time zone where the unlocking terminal is located; The unlocking terminal is further used to parse the machine key and confirm whether the device information and current time information of the current unlocking terminal match the parsed information; The laser embedded end is also used to control the current laser to unlock when it is confirmed that the device information and current time information of the current unlocking terminal match the parsed information and further determines that the SN code of the current laser matches the parsed information.

[0016] According to a third aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the processor is configured to implement the steps of the above-mentioned remote unlocking method of the Q-switched laser when executing a computer management program stored in the memory.

[0017] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored, and when the computer management program is executed by a processor, the steps of the remote unlocking method of the Q-switched laser are implemented.

[0018] The invention provides a remote unlocking method, system, electronic device and storage medium for a Q-switched laser, which can conveniently implement the decryption operation of the laser device, and can realize accurate decryption in a limited time period according to the time of the laser location and the device information of the laser corresponding to the unlocking terminal, so that the decryption key of each laser in each time period is different, avoiding the situation where one key unlocks multiple machines. The scheme of the invention can realize one-time-one-code-one-machine decryption in a different place based on the serial communication function between the laser MCU embedded software, the client unlocking terminal and the server host computer, and the key times out, each key can only be used once, and each machine can only be decrypted once, which improves the decryption accuracy and security of the laser. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of an application scenario of a remote unlocking method for a Q-switched laser provided by the present invention; Figure 2 A flow chart of a remote unlocking method for a Q-switched laser provided by the present invention; Figure 3 A schematic diagram of a process for generating machine code in a specific embodiment; Figure 4 A schematic diagram of a process for generating a machine key in a specific embodiment; Figure 5 A schematic diagram of a process of unlocking a laser according to a machine key in a specific embodiment; Figure 6 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention; Figure 7 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0020] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0021] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of a remote unlocking method for a Q-switched laser provided by the present invention, Figure 2 A flow chart of a remote unlocking method for a Q-switched laser provided in an embodiment of the present invention.

[0022] Combination Figure 1 As shown, the present invention is suitable for scenarios where the server-side host computer remotely decrypts the laser accurately and within a limited time. For example, the client-side host computer is used as the unlocking terminal, the laser-side MCU is provided with embedded software, the client-side host computer communicates with the laser through the RS232 serial port, and the client-side host computer communicates remotely with the server-side host computer. In short, the present invention involves three softwares: one is set in the unlocking terminal, and is used for the client-side host computer to provide the client-side Q-switched laser for decryption; one is set in the server-side host computer, and is used for the server-side host computer to encrypt and set each Q-switched laser and generate the corresponding decryption key; and one is the embedded software burned into the Q-switched laser. The usage sequence of the three softwares can be referred to. Figure 1 .

[0023] The SN code (serial code) of the laser is an identification mark set during its production process. It is unique and is pre-stored in the embedded software of the MCU on the laser end. The device information of the unlocking terminal (i.e., the client host computer) is also unique. Through the device information of the unlocking terminal, the unique unlocking terminal can be queried. In the use scenario of the laser, the client host computer (unlocking terminal) is usually located at the customer's site with the laser, while the server host computer is usually located at the manufacturer of the laser. The customer and the manufacturer may be geographically far apart, for example, across multiple time zones. When the customer needs to unlock the laser for use, the client computer (unlocking terminal) initiates an unlocking request to the server computer. The unlocking request contains at least the SN code of the laser to be unlocked, the device information of the unlocking terminal, and the time information of the unlocking terminal. The server computer encrypts the received information and generates the corresponding key, and sends the key corresponding to the laser and the unlocking terminal to the client computer (unlocking terminal). The key is only allowed to unlock within the set time range. If the customer delays unlocking, replaces the client computer (unlocking terminal) or replaces the laser to be unlocked after initiating the unlocking request, the unlocking cannot be successfully completed.

[0024] Based on this background and principle, combined with Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a remote unlocking method for a Q-switched laser. The method is implemented based on an unlocking system. The unlocking system includes an unlocking terminal, a server host computer, and a laser embedded end. The method includes steps S1 to S3: S1, the unlocking terminal generates a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal, and reports the machine code to the server host computer; S2, the server host computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located, and issues it to the unlocking terminal; S3, the unlocking terminal parses the received machine key, and if the SN code of the current laser, the device information of the current unlocking terminal and the current time information match the parsed information, the laser embedding end unlocks the current laser.

[0025] It is understandable that, based on the defects in the background technology, an embodiment of the present invention proposes a remote unlocking method for a Q-switched laser. This method can easily implement the decryption operation of the laser device, and can realize one-to-one accurate decryption of a limited time period according to the time of the laser's location and the device information of the laser corresponding to the unlocking terminal, so that the decryption key of each laser in each time period is different, avoiding the situation where one key unlocks multiple machines. The solution of the present invention can be based on the serial communication function between the laser MCU embedded software, the client unlocking terminal and the server host computer, to realize the decryption of one code and one machine in a different time period in a different place, and the key times out, each key can only be used once, and each machine can only be decrypted once, which improves the decryption accuracy and security of the laser.

[0026] In a possible implementation manner, step S1 includes S101-S104: S101, establish a communication connection between the embedded end of the laser to be unlocked and the unlocking terminal, query the SN code of the laser to be unlocked, the device information of the unlocking terminal and the real-time time information of the unlocking terminal; wherein the device information of the unlocking terminal includes multiple items of the IP address, CPU ID, MAC address and hard disk serial number of the current unlocking terminal.

[0027] S102, encrypting the device information of the unlocked terminal to generate a first primary ciphertext; specifically comprising: The device information of the unlocked terminal is added to a preset custom character string to form a first character string, and the first character string is encrypted a preset number of times using an encryption tool to generate a first primary ciphertext.

[0028] S103, processing the real-time time information of the unlocked terminal to generate a first time key; specifically including: The month, week, and hour in the real-time time information of the unlocked terminal are added, multiplied by the first custom number, and modulo the second custom number to generate a first time key.

[0029] S104, connecting the first primary ciphertext with the SN code obtained by the query, and encrypting them in combination with the first time key to generate a machine code.

[0030] For example Figure 3 As shown, the process of generating machine code in step S1 is shown in a specific embodiment.

[0031] Combination Figure 1 and Figure 3As shown, the customer powers on the laser and opens the serial port connected to the client host computer. At this time, the client host computer shakes hands with the embedded software of the laser to be unlocked. After the handshake is successful, the customer clicks the query button on the client host computer and sends a query SN number instruction to the embedded software. After receiving the instruction, the embedded software returns the SN number of the laser to the client host computer (for example: 4356303253444647303031). After the client host computer queries the SN number, it obtains the IP address, CPU ID, MAC address, and hard disk serial number on the client host computer (current computer), and adds a preset custom string to the IP address, CPU ID, MAC address, and hard disk serial number to form a new string (here named the first string). The encryption tool MD5 is used to encrypt the first string for a preset number of times (for example, 5 times) to generate a primary ciphertext (for example: a7ffc7c2865882e6e94f7f6e745549c3), which is called the first primary ciphertext here.

[0032] After generating the first primary ciphertext, the client host computer obtains the current computer time, adds the month, week, and hour, multiplies it by a first custom number, and then takes the remainder with the second custom number to generate a first time key (for example: 21).

[0033] Then, the first primary ciphertext is connected with the SN number of the laser to be unlocked obtained from the above query, separated by "|" to form a new string (herein referred to as the second string). The second string is encrypted together with the first time key using the ASE algorithm, and all the encrypted characters are reversed in order to generate a secondary ciphertext (for example: ==gyCbcYlPAZmKgr / hwWJRNi8jYRGdjnCKY9pZo3GHZ6hddN3XZt3clNVB20UibO4yJ2NzgeVDst3meOymYPHuBw). A randomly generated fixed-length string is added before and after the secondary ciphertext to obtain the final machine code (for example: ==gyCbcYlPAZmKgr / hwWJRNi8jYRGdjnCKY9pZo3GHZ6hddN3XZt3clNVB20UibO4yJ2NzgeVDst3meOymYPHuBw). The customer can copy the machine code and send it to the manufacturer / server host computer.

[0034] In a possible implementation manner, step S2 includes S201-S204: S201, the server host computer generates a second time key according to the real-time time information of the time zone where the unlocking terminal is located in the same manner as the first time key is generated; specifically: The server host computer adds the month, week, and hour in the real-time time information of the time zone where the unlocking terminal is located, multiplies the sum by the first custom number, and takes the remainder with the second custom number to generate a second time key; S202, the server host computer removes the preset fixed-length character strings before and after the machine code, and reverses the remaining character strings in order to obtain a third character string; Decrypt the second time key and the third character string using the ASE algorithm, and determine whether the machine code is correct according to the format of the character string obtained by decrypting the machine code: if correct, obtain the encrypted information character string of the unlocking terminal and the SN code of the laser separated by “|” from the character string obtained by decrypting the machine code; S203, the server host computer performs calculation processing on the SN code of the laser according to the preset calculation rules; including S2031~S2032: S2031, the last four digits of the decrypted SN code are combined in pairs to form two two-digit numbers, and the two two-digit numbers are operated with the preset custom number according to the preset operation rules to obtain the first digital key; for example, if the last four digits of the SN code are "3031", the two two-digit numbers "30" and "31" are obtained by combining in pairs. Assuming that the preset third custom number is 2 and the preset fourth custom number is 101, the following addition, subtraction, multiplication and division operations are performed on "30" and "31": , and then take the modulo 101 of the operation result, and the result obtained by taking the modulo here is used as the first digital key.

[0035] S2032, the server host computer compares the first digital key with a preset value, and processes the SN code according to the comparison result to obtain a fourth character string.

[0036] Step S2032 specifically includes: If it is determined that the first digital key is less than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are modulo the first digital key, and all odd-numbered bytes of the SN code decrypted in step S202 are rounded to the integer of the first digital key; If it is determined that the first digital key is greater than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are compared with the first digital key: if the result is greater than, all even-numbered bytes of the SN code decrypted in step S202 are subtracted from the first digital key; if the result is less than, all even-numbered bytes of the SN code decrypted in step S202 are added with the first digital key, and the odd-numbered bytes of the SN code decrypted in step S202 are not processed; The data obtained by comparing the first digital key with the preset value are processed to form a new character string in sequence, namely, the fourth character string.

[0037] S204, the server host computer connects the encrypted information string of the unlocking terminal obtained by parsing with the fourth string obtained by SN code operation processing, and separates them with "|" to form a fifth string; and performs ASE encryption on the fifth string in reverse order with the second time key to obtain a primary key; and adds a random string of fixed digits before and after the primary key to generate a machine key.

[0038] For example Figure 4 As shown, the process of generating a machine key in step S2 is shown in a specific embodiment.

[0039] Combination Figure 1 and Figure 4 As shown, after receiving the machine code from the customer, the manufacturer enters it into the server host computer and selects the time zone of the customer's location, and then clicks the Generate Machine Key button. The server host computer first removes the fixed-length strings before and after the machine code, and then reverses the remaining strings in order to obtain the third string (for example: wBuHPYmyOem3tsDVegzN2Jy4ObiU02BVNlc3tZX3Nddh6ZHG3oZp9YKCnjdGRYj8iNRJWwh / rgKmZAPlYcbCyg==). Then add the month, week, and hour of the current time at the customer's location, then multiply it by the third custom number, and take the modulus with the fourth custom number to generate the second time key (for example: 21).

[0040] The second time key and the third string are decrypted using the ASE algorithm. If the machine code sent by the customer is wrong or the manufacturer is contacted after a period of time after obtaining the machine code, the format of the string obtained after decryption is wrong. At this time, the manufacturer will contact the customer to provide the correct information. If the machine code sent by the customer is correct and is not sent with delay, the string obtained after decryption consists of three parts: the first half is the encrypted information string of the customer's computer (unlocking terminal) (for example: a7ffc7c2865882e6e94f7f6e745549c3), separated by "|", and the second half is the SN number of the machine (for example: 4356303253444647303031). At this time, the last four digits of the SN number are combined in pairs to form two two-digit numbers. After adding, subtracting, multiplying and dividing the two two-digit numbers with the agreed third custom number, the remainder of the agreed fourth custom number is taken to obtain the first digital key.

[0041] A preset value (for example, 10) is set in advance. If the first digital key is less than 10, all even-digit bytes of the SN are modulo the first digital key, and all odd-digit bytes of the SN are rounded to the integer of the first digital key; if the first digital key is greater than 10, all even-digit bytes of the SN are compared with the first digital key. If it is greater than, the first digital key is subtracted, and if it is less than, the first digital key is added, and the odd digits are not processed. The processed results are sequentially composed into a new string, that is, the fourth string (taking the first digital key less than 10 as an example, the fourth string obtained is: 030a000603080608000601). The fourth character string and the encrypted information character string of the client computer obtained by parsing are used to form the fifth character string with “|” as the interval, and the fifth character string is ASE encrypted with the second time key in reverse order to obtain the primary key (for example: swsQZONWdTLrd / R0RnxkfPgb+IBcW / 4dUA2BL / rz1HqMP6EARO3f6 / V3ws0T2ZDDx0Qy / kslBOdzJwl6kQLBTA==).

[0042] Then add a random string of fixed digits before and after the primary key to generate a machine key (for example: 96e7eswsQZONWdTLrd / R0RnxkfPgb+IBcW / 4dUA2BL / rz1HqMP6EARO3f6 / V3ws0T2ZDDx0Qy / kslBOdzJwl6kQLBTA==8affc), and the manufacturer will send the machine key to the customer.

[0043] In a possible implementation manner, in step S3, the unlocking terminal parses the machine key, and if the SN code of the current laser, the device information of the current unlocking terminal, and the current time information match the parsed information, the laser embedding end unlocks the current laser, including: S301, the unlocking terminal obtains the current time information of the unlocking terminal, and generates a third time key according to the current time information in the same manner as the first time key is generated; S302, the unlocking terminal removes the character strings of fixed digits at the front and back of the machine key to obtain a sixth character string corresponding to the primary key; The sixth character string and the third time key are decrypted using ASE and reversed in sequence to obtain the seventh character string, and whether the format of the seventh character string is correct is determined: if the format of the seventh character string is correct, it is determined that the current time information of the currently unlocked terminal matches the time information contained in the machine key successfully, indicating that this time is within the effective unlocking time.

[0044] If the above result is a match, the encrypted information string of the unlocking terminal and the encrypted laser SN code are obtained from the seventh string decrypted from the machine key; if the result is a mismatch, the unlocking fails; S303, the unlocking terminal obtains the device information of the current unlocking terminal, encrypts the device information of the current unlocking terminal according to the encryption method of the first primary ciphertext, and compares the encryption result with the encrypted information character string of the unlocking terminal obtained from the decryption result of the machine key; Specifically, the unlocking terminal obtains the device information of the currently unlocking terminal, adds a preset custom string according to the device information of the currently unlocking terminal, and uses an encryption tool (MD5) to encrypt a preset number of times to generate an eighth string; the eighth string is compared with the encrypted information string of the unlocking terminal obtained from the seventh string.

[0045] If the comparison result is consistent, it is determined that the current unlocking terminal matches successfully, otherwise the unlocking fails; S304, the laser embedding end performs calculation processing on the SN code of the current laser according to the preset calculation rules described in step S203, and compares the processing result with the encrypted laser SN code obtained from the machine key decryption result: if the comparison result is consistent, it is determined that the SN code of the current laser matches successfully, and the laser embedding end unlocks the current laser; otherwise, the unlocking fails.

[0046] Specifically include: The laser embedding end combines the last four digits of the SN code of the current laser in pairs to form two two-digit numbers, performs addition, subtraction, multiplication and division operations on the two two-digit numbers and the third custom number in accordance with step S203, and modulos the fourth custom number to obtain a second digital key; compares the second digital key with the preset value, and processes the current laser SN code according to the comparison result to obtain a ninth character string; compares the ninth character string with the encrypted laser SN code obtained from the seventh character string. If the comparison result is consistent, it is determined that the SN code of the current laser matches successfully and the current laser is unlocked; otherwise, the unlocking fails.

[0047] For example Figure 5 As shown, a specific embodiment is used to illustrate the process of parsing the machine key and unlocking the laser in step S3.

[0048] Combination Figure 1 and Figure 5 As shown, the unlocking process between the client host computer and the laser embedded software is as follows: The customer powers on the laser to be unlocked and opens the serial port of the client host computer. At this time, the client host computer and the embedded software shake hands. After the handshake is successful, the customer enters the machine key provided by the manufacturer and clicks the unlock button.

[0049] At this time, the client host computer first removes the fixed-length strings before and after the machine key to obtain the sixth string corresponding to the primary key (for example: swsQZONWdTLrd / R0RnxkfPgb+IBcW / 4dUA2BL / rz1HqMP6EARO3f6 / V3ws0T2ZDDx0Qy / kslBOdzJwl6kQLBTA==). Then, obtain the time of the current computer (client host computer), add the month, week, and hour and multiply them by the third custom number, and take the remainder with the fourth custom number to generate the third time key (for example: 21), decrypt the sixth string and the third time key using ASE, and reverse them in order to obtain the seventh string.

[0050] If the customer does not unlock the machine in time after receiving the machine key, but delays for a period of time (beyond the specified unlocking time range), the third time key is wrong, resulting in the seventh character string format error after unlocking. If the customer unlocks the machine in time within the specified unlocking time range after receiving the machine key, the seventh character string consists of three parts: the first half is the encrypted information character string of the customer's computer (for example: a7ffc7c2865882e6e94f7f6e745549c3), separated by "|", and the second half is the encrypted machine SN number (for example: 030a000603080608000601); Then, the client host will obtain the IP address, CPUID, MAC address, and hard disk serial number of the current computer, add a custom string to the IP address, CPUID, MAC address, and hard disk serial number to form a new string, encrypt this new string 5 times using MD5 to generate the eighth string (for example: a7ffc7c2865882e6e94f7f6e745549c3). At this time, the eighth string is compared with the encrypted information string of the client host obtained by decryption. If the results are inconsistent, it means that the computer has been changed after the machine code is generated and before unlocking, and the customer will be directly prompted to contact the manufacturer; if the results are consistent, it means that the customer has not changed the computer in the middle.

[0051] At this time, the server host will add a random string of fixed digits (for example: 030a000603080608000601098267) after the encrypted machine SN number obtained by parsing, and send it to the embedded software of the laser through the serial port. After receiving the data, the embedded software first removes the random string of fixed digits at the end to obtain the encrypted machine SN number obtained by parsing (for example: 030a000603080608000601). The embedded software performs calculations on the SN code of the current laser according to the calculation rules preset in step S203, and combines the last four digits of the SN number stored in the MCU chip into two two-digit numbers. After adding, subtracting, multiplying and dividing the two two-digit numbers with the agreed third custom number, the modulus of the agreed fourth custom number is taken to obtain the second digital key.

[0052] If the second digital key is less than a preset value (e.g., 10), all even-digit bytes of the SN are modulo the second digital key, and all odd-digit bytes of the SN are rounded to the integer of the second digital key. If the second digital key is greater than 10, all even-digit bytes of the SN are compared with the second digital key. If greater than, the second digital key is subtracted, and if less than, the second digital key is added, and the odd digits are not processed. The processed data is sequentially composed into a new string, i.e., the ninth string (taking the second digital key less than 10 as an example, the ninth string is: 030a000603080608000601).

[0053] Then, the embedded software of the laser will compare the ninth character string with the encrypted machine SN number obtained after parsing: If they are inconsistent, it means that the laser with the machine code obtained by the customer is inconsistent with the laser to be unlocked, and the unlocking fails, and the customer should contact the manufacturer again. If they are consistent, it means that the laser with the machine code obtained by the customer is consistent with the laser to be unlocked, and the unlocking is successful, and the customer can use the laser normally afterwards. Regardless of whether the unlocking is successful or failed, the unlocking button of the client host computer is locked and cannot be clicked again. There is no unlocking function, and the manufacturer needs to be contacted for subsequent unlocking.

[0054] Figure 1 The structure of a remote unlocking system for a Q-switched laser provided by an embodiment of the present invention is shown. Figure 1 As shown, a remote unlocking system for a Q-switched laser includes a laser embedded end, an unlocking terminal and a server host computer, wherein the laser embedded end is communicatively connected to the unlocking terminal, and the unlocking terminal is communicatively connected to the server host computer, wherein: The laser embedding end is used to pre-store the SN code of the corresponding laser and control the corresponding laser; The unlocking terminal is used to query the laser embedding end for the SN code of the laser to be unlocked, and generate a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal; The server host computer is used to generate a machine key according to the machine code and the time zone where the unlocking terminal is located; The unlocking terminal is further used to parse the machine key and confirm whether the device information and current time information of the current unlocking terminal match the parsed information; The laser embedded end is also used to control the current laser to unlock when it is confirmed that the device information and current time information of the current unlocking terminal match the parsed information and further determines that the SN code of the current laser matches the parsed information.

[0055] It can be understood that the remote unlocking system of a Q-switched laser provided by the present invention corresponds to the remote unlocking method of the Q-switched laser provided in the aforementioned embodiments. The relevant technical features of the remote unlocking system of the Q-switched laser can refer to the relevant technical features of the remote unlocking method of the Q-switched laser, which will not be repeated here.

[0056] See also Figure 6 , Figure 6 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 6 As shown, an embodiment of the present invention provides an electronic device 600, including a memory 610, a processor 620, and a computer program 611 stored in the memory 610 and executable on the processor 620. When the processor 620 executes the computer program 611, the following steps are implemented: Generate a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal, and the time information of the unlocking terminal; Generate a machine key according to the machine code and the time zone where the unlocking terminal is located; The machine key is parsed, and if the SN code of the current laser, the device information of the current unlocking terminal and the current time information match the parsed information, the current laser is unlocked.

[0057] See also Figure 7 , Figure 7 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 7 As shown, this embodiment provides a computer-readable storage medium 700, on which a computer program 711 is stored. When the computer program 711 is executed by a processor, the following steps are implemented: Generate a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal, and the time information of the unlocking terminal; Generate a machine key according to the machine code and the time zone where the unlocking terminal is located; The machine key is parsed, and if the SN code of the current laser, the device information of the current unlocking terminal and the current time information match the parsed information, the current laser is unlocked.

[0058] The embodiments of the present invention provide a remote unlocking method, system, electronic device and storage medium for a Q-switched laser, which can easily realize the decryption operation of the laser device, and can realize one-to-one accurate decryption in a limited time period according to the time of the laser location and the device information of the laser corresponding to the unlocking terminal, so that the decryption key of each laser in each time period is different, avoiding the situation where one key unlocks multiple machines. The solution of the present invention can realize one-time one-code one-machine decryption in a different place based on the serial communication function between the laser MCU embedded software, the client unlocking terminal and the server host computer, and the key times out, each key can only be used once, and each machine can only be decrypted once, which improves the decryption accuracy and security of the laser.

[0059] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0060] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0061] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0062] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0064] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0065] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A remote unlocking method for a Q-switched laser, the method is implemented based on an unlocking system, the unlocking system includes an unlocking terminal, a server host computer and a laser embedded end, characterized in that: The method includes: S1, the unlocking terminal generates a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal; S2, the server host computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located; S3, the unlocking terminal parses the machine key. If the SN code of the current laser, the device information of the current unlocking terminal and the current time information match the parsed information, the laser embedding end unlocks the current laser.

2. A remote unlocking method for a Q-switched laser according to claim 1, characterized in that: Step S1 includes: S101, establishing a communication connection between the embedded end of the laser to be unlocked and the unlocking terminal, querying the SN code of the laser to be unlocked, the device information of the unlocking terminal, and the real-time time information of the unlocking terminal; S102, encrypting the device information of the unlocked terminal to generate a first primary ciphertext; S103, processing the real-time time information of the unlocking terminal to generate a first time key; S104, connecting the first primary ciphertext with the SN code obtained by the query, and encrypting them in combination with the first time key to generate a machine code.

3. A remote unlocking method for a Q-switched laser according to claim 2, characterized in that: The device information of the unlocking terminal includes multiple items of the IP address, CPU ID, MAC address, and hard disk serial number of the current unlocking terminal.

4. The remote unlocking method of a Q-switched laser according to claim 3, characterized in that: In S102, encrypting the device information of the unlocked terminal to generate a first primary ciphertext includes: The device information of the unlocked terminal is added to a preset custom character string to form a first character string, and the first character string is encrypted a preset number of times using an encryption tool to generate a first primary ciphertext.

5. A remote unlocking method for a Q-switched laser according to any one of claims 2 to 4, characterized in that: In S103, the processing of the real-time time information of the unlocking terminal to generate a first time key includes: The month, week, and hour in the real-time time information of the unlocked terminal are added, multiplied by the first custom number, and modulo the second custom number to generate a first time key.

6. A remote unlocking method for a Q-switched laser according to claim 2, characterized in that: Step S2 comprises: S201, the server host computer generates a second time key according to the real-time time information of the time zone where the unlocking terminal is located in the same manner as the first time key is generated; S202, using the second time key to decrypt the machine code, and judging whether the machine code is correct according to the format of the string obtained by decrypting the machine code: if it is correct, obtaining the encrypted information string of the unlocking terminal and the SN code of the laser from the string obtained by decrypting the machine code; S203, performing calculation processing on the SN code of the laser according to a preset calculation rule; S204, concatenating the encrypted information character string of the unlocking terminal obtained by parsing with the character string obtained by the SN code operation processing, and performing encryption processing in combination with the second time key to generate a machine key.

7. A remote unlocking method for a Q-switched laser according to claim 6, characterized in that: In S203, the SN code of the laser is processed according to a preset operation rule, including: The last four digits of the decrypted SN code are combined in pairs to form two two-digit numbers, and the two two-digit numbers are calculated with the preset custom number according to the preset calculation rules to obtain the first digital key; The first digital key is compared with a preset value, and the SN code is processed according to the comparison result.

8. A remote unlocking method for a Q-switched laser according to claim 7, characterized in that: The comparing the first digital key with the preset value and processing the SN code according to the comparison result includes: If it is determined that the first digital key is less than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are modulo the first digital key, and all odd-numbered bytes of the SN code decrypted in step S202 are rounded to the integer of the first digital key; If it is determined that the first digital key is greater than the preset value, all even-numbered bytes of the SN code decrypted in step S202 are compared with the first digital key: if the result is greater than, all even-numbered bytes of the SN code decrypted in step S202 are subtracted from the first digital key; if the result is less than, all even-numbered bytes of the SN code decrypted in step S202 are added with the first digital key, and the odd-numbered bytes of the SN code decrypted in step S202 are not processed; The data obtained by comparing the first digital key with the preset value are processed to form a new character string in sequence.

9. A remote unlocking method for a Q-switched laser according to any one of claims 2 to 4 and 6 to 8, characterized in that: Step S3 includes: S301, the unlocking terminal obtains the current time information of the unlocking terminal, and generates a third time key according to the current time information in the same manner as the first time key is generated; S302, using the third time key to decrypt the machine key, and judging whether the current time information matches the time information contained in the machine key according to the string format obtained by decryption: if the result is a match, obtaining the encrypted information string of the unlocking terminal and the encrypted laser SN code from the decryption result of the machine key; if the result is a mismatch, the unlocking fails; S303, obtaining device information of the current unlocking terminal, encrypting the device information of the current unlocking terminal according to the encryption method of the first primary ciphertext, and comparing the encryption result with the encrypted information string of the unlocking terminal obtained from the decryption result of the machine key: if the comparison result is consistent, it is determined that the current unlocking terminal matches successfully, otherwise the unlocking fails; S304, the laser embedding end performs calculation processing on the SN code of the current laser according to the preset calculation rules described in step S203, and compares the processing result with the encrypted laser SN code obtained from the machine key decryption result: if the comparison result is consistent, it is determined that the SN code of the current laser matches successfully and the current laser is unlocked; otherwise, the unlocking fails.

10. A remote unlocking system for a Q-switched laser, characterized in that: It includes a laser embedded end, an unlocking terminal and a server host computer, wherein the laser embedded end is connected to the unlocking terminal in communication, and the unlocking terminal is connected to the server host computer in communication, wherein: The laser embedding end is used to pre-store the SN code of the corresponding laser and control the corresponding laser; The unlocking terminal is used to query the laser embedding end for the SN code of the laser to be unlocked, and generate a machine code according to the SN code of the laser to be unlocked, the device information of the unlocking terminal and the time information of the unlocking terminal; The server host computer is used to generate a machine key according to the machine code and the time zone where the unlocking terminal is located; The unlocking terminal is further used to parse the machine key and confirm whether the device information and current time information of the current unlocking terminal match the parsed information; The laser embedded end is also used to control the current laser to unlock when it is confirmed that the device information and current time information of the current unlocking terminal match the parsed information and further determines that the SN code of the current laser matches the parsed information.

Citation Information

Patent Citations

  • Method, device and system for unlocking electronic key

    CN102075327A

  • Unlocking method of intelligent lock, terminal, server and unlocking system

    CN107393066A

  • Intelligent lock unlocking method, intelligent lock, terminal, server and system

    CN109905235A

  • Encryption method, decryption method, encryption system and decryption system of fiber laser

    CN111046404A

  • Unlocking method and device thereof, electronic equipment and storage medium

    CN113674456A