Remote unlocking method and system for a Q-switched laser

By designing a remote unlocking system based on the serial communication module in the Q-tuning laser, the coordinated work of the unlocking terminal, the server-side upper computer and the laser embedded end is solved, and efficient and secure laser decryption operation is achieved.

CN119892529BActive Publication Date: 2025-06-17WUHAN STRONGEST LASER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing Q-tuning lasers are difficult to remotely lock and unlock under 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 serial communication module of the Q-tuning laser is designed. Through the coordinated work of the unlocking terminal, the server-side upper computer and the laser embedded end, the machine code and machine key are generated to realize the precise encryption and decryption of the laser.

Benefits of technology

It simplifies the operation process, improves the convenience and security of equipment operation, and realizes a unique decryption key for each laser per time period, avoiding the situation where one key unlocks multiple machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892529B_ABST
    Figure CN119892529B_ABST
Patent Text Reader

Abstract

The present invention provides a remote unlocking method and system for a Q-switched laser. The system includes an unlocking terminal, a server host computer, and a laser embedding terminal. The method includes: 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; the server host computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located; 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 terminal unlocks the current laser. The present invention relies solely on software for unlocking, improving the convenience of the laser decryption operation, and being able to achieve precise decryption within a limited time period according to the real-time time and device information of the unlocking terminal, realizing one-time one-code one-machine decryption in different locations, and improving the laser decryption accuracy and security.
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-switch laser control, and more specifically, to a remote unlocking method and system for a Q-switch laser. Background Art

[0002] Generally, Q-switch lasers do not have a wireless communication module and are widely distributed all over the world. It is very difficult to control such Q-switch laser devices to be locked under special circumstances and can only be used after unlocking. If physical decryption is used, the operation process will be very cumbersome and will increase the machine cost. If the existing hardware conditions of the Q-switch laser can be fully utilized, for example, using the serial communication module that all Q-switch lasers have for software locking and decryption, the device encryption / decryption operation can be realized very conveniently.

[0003] Therefore, it is necessary to design a more accurate and convenient encryption / decryption scheme based on the serial communication module of the Q-switch 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-switch laser, which uses the existing serial communication method of the device to realize more accurate encryption / decryption operations, simplifies the operation process, and improves the convenience and security of device operation.

[0005] According to a first aspect of the present invention, there is provided a remote unlocking method for a Q-switch laser, which 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:

[0006] 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.

[0007] S2. The server host computer generates a machine key according to the machine code and the time zone where the unlocking terminal is located.

[0008] 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 embedded end unlocks the current laser.

[0009] On the basis of the above technical solution, the present invention can also be improved as follows.

[0010] Optionally, step S1 includes:

[0011] S101. Establish a communication connection between the laser embedded end to be unlocked and the unlocking terminal, and 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.

[0012] S102. Encrypt the device information of the unlocking terminal to generate a first primary ciphertext;

[0013] S103. Process the real-time time information of the unlocking terminal to generate a first time key;

[0014] S104. Connect the first primary ciphertext with the queried SN code, and perform encryption processing in combination with the first time key to generate a machine code.

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

[0016] Optionally, in S102, the encrypting the device information of the unlocking terminal to generate a first primary ciphertext includes:

[0017] Add a preset custom string to the device information of the unlocking terminal to form a first string, and encrypt the first string with an encryption tool for a preset number of times to generate a first primary ciphertext.

[0018] Optionally, in S103, the processing the real-time time information of the unlocking terminal to generate a first time key includes:

[0019] Add the month, week, and hour number in the real-time time information of the unlocking terminal, multiply by a first custom number, and take the remainder with a second custom number to generate a first time key.

[0020] Optionally, step S2 includes:

[0021] 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 way as generating the first time key;

[0022] S202. Decrypt the machine code with the second time key, and judge whether the machine code is correct according to the format of the string obtained by decrypting the machine code: if it is correct, obtain the encrypted information string of the unlocking terminal and the SN code of the laser from the string obtained by decrypting the machine code;

[0023] S203. Perform arithmetic processing on the SN code of the laser according to a preset arithmetic rule;

[0024] S204. Connect the parsed encrypted information string of the unlocking terminal with the string obtained by arithmetic processing of the SN code, and perform encryption processing in combination with the second time key to generate a machine key.

[0025] Optionally, in S203, the operation and processing of the SN code of the laser according to the preset operation rules includes:

[0026] Combine the last four digits of the decrypted SN code in pairs to form two two-digit numbers, and perform operations on the two two-digit numbers and the preset custom numbers according to the preset operation rules to obtain the first digital key;

[0027] Compare the size of the first digital key with the preset value, and process the SN code according to the comparison result.

[0028] Optionally, the comparison of the size of the first digital key with the preset value and the processing of the SN code according to the comparison result include:

[0029] If it is determined that the first digital key is less than the preset value, take the remainder of all even-bit bytes of the SN code decrypted in step S202 with respect to the first digital key, and take the integer part of all odd-bit bytes of the SN code decrypted in step S202 with respect to the first digital key;

[0030] If it is determined that the first digital key is greater than the preset value, then compare the size of all even-bit bytes of the SN code decrypted in step S202 with the first digital key: if the result is greater, subtract the first digital key from all even-bit bytes of the SN code decrypted in step S202; if the result is less, add the first digital key to all even-bit bytes of the SN code decrypted in step S202, and do not process the odd bits of the SN code decrypted in step S202;

[0031] The data obtained by processing according to the comparison result of the first digital key and the preset value are sequentially composed into a new string.

[0032] Optionally, step S3 includes:

[0033] S301, the unlocking terminal obtains the current time information of the current unlocking terminal, and generates a third time key according to the current time information in the manner of generating the first time key;

[0034] S302, decrypt the machine key with the third time key, and judge whether the current time information matches the time information included in the machine key according to the decrypted string format: if the result is a match, obtain 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;

[0035] S303. Obtain the device information of the currently unlocked terminal, encrypt the device information of the currently unlocked terminal according to the encryption method of the first primary ciphertext, and compare the encryption result with the encrypted information string of the unlocked terminal obtained from the decryption result of the machine key: If the comparison result is consistent, it is determined that the currently unlocked terminal matches successfully; otherwise, the unlocking fails.

[0036] S304. The laser embedding end performs arithmetic processing on the SN code of the current laser according to the preset arithmetic rule in step S203, and compares the processing result with the encrypted SN code of the laser obtained from the decryption result of the machine key: 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.

[0037] According to the second aspect of the present invention, a remote unlocking system for a Q-switching laser is provided, including a laser embedding end, an unlocking terminal, and a server host computer. The laser embedding end is communicatively connected to the unlocking terminal, and the unlocking terminal is communicatively connected to the server host computer, wherein:

[0038] The laser embedding end is used to pre-store the SN code of the corresponding laser and control the corresponding laser.

[0039] The unlocking terminal is used to query the SN code of the laser to be unlocked from the laser embedding end, 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.

[0040] 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.

[0041] The unlocking terminal is further used to parse the machine key and confirm whether the device information and the current time information of the current unlocking terminal match the parsed information.

[0042] The laser embedding end is further used to control the current laser to unlock when it is confirmed that the device information and the current time information of the current unlocking terminal match the parsed information and further determine that the SN code of the current laser matches the parsed information.

[0043] According to the third aspect of the present invention, an electronic device is provided, including a memory and a processor. When the processor executes the computer management program stored in the memory, the steps of the above-mentioned remote unlocking method for a Q-switching laser are implemented.

[0044] According to the fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the above-mentioned remote unlocking method for a Q-switching laser are implemented.

[0045] A remote unlocking method, system, electronic device and storage medium for a Q-switched laser provided by the present invention can conveniently implement the decryption operation of the laser device, and can accurately decrypt within a limited time period according to the time at the location of the laser and the device information of the unlocking terminal corresponding to the laser, so that the decryption keys for each laser at each time period are different, avoiding the situation of unlocking multiple machines with one key. The solution of the present invention can realize one-code-one-machine decryption at different locations and at the same time period based on the serial communication function among the laser MCU embedded software, the client unlocking terminal and the server host computer, and the key expires after a timeout, each key can only be used once, and each machine can only be decrypted once, improving the decryption accuracy and security of the laser. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of an application scenario of a remote unlocking method for a Q-switched laser provided by the present invention;

[0047] Figure 2 It is a flowchart of a remote unlocking method for a Q-switched laser provided by the present invention;

[0048] Figure 3 It is a schematic diagram of the process of generating a machine code in a specific embodiment;

[0049] Figure 4 It is a schematic diagram of the process of generating a machine key in a specific embodiment;

[0050] Figure 5 It is a schematic diagram of the process of unlocking a laser according to a machine key in a specific embodiment;

[0051] Figure 6 It is a schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0052] Figure 7 It is a schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] The following combines the drawings and embodiments to further describe in detail the specific embodiments of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0054] Please refer to Figure 1 and Figure 2 , Figure 1 which is a schematic diagram of an application scenario of a remote unlocking method for a Q-switched laser provided by the present invention, Figure 2 and which is a flowchart of a remote unlocking method for a Q-switched laser provided by an embodiment of the present invention.

[0055] Combined Figure 1 As shown, the present invention is applicable to the scenario of remotely and precisely decrypting a laser by a server host computer within a limited time. For example, the client host computer is used as an unlocking terminal, and the MCU at the laser end is provided with embedded software. The client host computer communicates with the laser through an RS232 serial port, and the client host computer communicates remotely with the server host computer. In short, the present invention involves a total of three software: one is set on the unlocking terminal and is used for the client host computer to provide decryption for the client Q-switch laser; one is set on the server host computer and is used for the server host computer to perform encryption settings on each Q-switch laser and generate corresponding decryption keys; one is the embedded software burned into the Q-switch laser. The usage timing of the three software can be referred to Figure 1 .

[0056] The SN code (serial number) of the laser is the identity identifier set during its production process, which is unique and is pre-stored in the embedded software of the MCU at 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 usage scenario of the laser, the client host computer (unlocking terminal) is usually located at the customer's place with the laser, while the server host computer is usually located at the laser manufacturer's place. The customer's place and the manufacturer's place may be far apart geographically, for example, spanning multiple time zones. When the customer needs to unlock the laser for use, an unlocking request is sent from the client host computer (unlocking terminal) to the server host computer. The unlocking request includes 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 host computer generates a corresponding key after data encryption processing based on the received information and sends the key corresponding to the laser and the unlocking terminal to the client host computer (unlocking terminal). This key is only allowed to be used for unlocking within the set time range. If the customer delays unlocking, replaces the client host computer (unlocking terminal), or replaces the laser to be unlocked after sending the unlocking request, the unlocking cannot be successful.

[0057] Based on such a 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-switch laser. The method is implemented based on an unlocking system, and the unlocking system includes an unlocking terminal, a server host computer, and a laser embedded end. The method includes steps S1 to S3:

[0058] 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;

[0059] 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;

[0060] S3. The unlocking terminal parses the received 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 embedded end of the laser unlocks the current laser.

[0061] It can be understood that based on the defects in the background technology, the embodiment of the present invention proposes a remote unlocking method for a Q-switching laser. This method can conveniently implement the decryption operation of the laser device, and can achieve one-to-one precise decryption within a limited time period according to the time at the location of the laser and the device information of the unlocking terminal corresponding to the laser, so that the decryption key is different for each laser in each time period, avoiding the situation of using one key to unlock multiple machines. The solution of the present invention can realize off-site one-code-one-machine decryption within one time period based on the serial communication function between the MCU embedded software of the laser, the client unlocking terminal, and the server host computer, and the key expires after a timeout, each key can only be used once, and each machine can only be decrypted once, improving the decryption accuracy and security of the laser.

[0062] In a possible embodiment, step S1 includes S101 to S104:

[0063] S101. Establish a communication connection between the embedded end of the laser to be unlocked and the unlocking terminal, and 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 such as the IP address, CPU ID, MAC address, and hard disk serial number of the current unlocking terminal.

[0064] S102. Encrypt the device information of the unlocking terminal to generate a first primary ciphertext; specifically including:

[0065] Add a preset custom string to the device information of the unlocking terminal to form a first string, and encrypt the first string with an encryption tool for a preset number of times to generate a first primary ciphertext.

[0066] S103. Process the real-time time information of the unlocking terminal to generate a first time key; specifically including:

[0067] Add the month, week, and hour number in the real-time time information of the unlocking terminal, multiply by a first custom number, and take the remainder with a second custom number to generate a first time key.

[0068] S104. Connect the first primary ciphertext with the queried SN code, and perform encryption processing in combination with the first time key to generate a machine code.

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

[0070] Combined with Figure 1 and Figure 3 As shown, the customer powers on the laser and opens the serial port connection of the client upper computer. At this time, the client upper 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 upper computer to send 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 upper computer (example: 4356303253444647303031). After the client upper computer queries the SN number, it obtains the IP address, CPU ID, MAC address, and hard disk serial number on the client upper computer (the current computer), and combines the IP address, CPU ID, MAC address, and hard disk serial number with a preset custom string to form a new string (named the first string here). The first string is encrypted with the encryption tool MD5 for a preset number of times (for example, 5 times) to generate a primary ciphertext (example: a7ffc7c2865882e6e94f7f6e745549c3), which is called the first primary ciphertext here.

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

[0072] Subsequently, the first primary ciphertext is connected to the SN number of the laser to be unlocked obtained from the aforementioned query, with "|" in between to form a new string (called the second string here). The second string and the first time key are encrypted using the ASE algorithm, and all the encrypted characters are reversed in order to generate a secondary ciphertext (example: ==gyCbcYlPAZmKgr / hwWJRNi8jYRGdjnCKY9pZo3GHZ6hddN3XZt3clNVB20UibO4yJ2NzgeVDst3meOymYPHuBw). Randomly generated fixed-length strings are added before and after the secondary ciphertext to obtain the final machine code (example: ==gyCbcYlPAZmKgr / hwWJRNi8jYRGdjnCKY9pZo3GHZ6hddN3XZt3clNVB20UibO4yJ2NzgeVDst3meOymYPHuBw). The customer can copy the machine code and send it to the manufacturer / server upper computer.

[0073] In a possible embodiment, step S2 includes S201 to S204:

[0074] S201, the server host computer generates a second time key according to the time information of the time zone where the unlocking terminal is located in the way of generating the first time key; specifically:

[0075] The server host computer adds the month, week, and hour number in the real-time time information of the time zone where the unlocking terminal is located, multiplies by a first custom number, and takes the remainder with a second custom number to generate a second time key;

[0076] S202, the server host computer removes the preset fixed-length strings from the front and back of the machine code respectively, reverses the remaining strings in order to obtain a third string;

[0077] Decrypt the second time key and the third string using the ASE algorithm, and judge whether the machine code is correct according to the format of the string obtained by decrypting the machine code: if it is correct, obtain the encrypted information string of the unlocking terminal and the SN code of the laser separated by "|" from the string obtained by decrypting the machine code;

[0078] S203, the server host computer performs arithmetic processing on the SN code of the laser according to the preset arithmetic rules; including S2031~S2032:

[0079] S2031, combine the last four digits of the decrypted SN code in pairs to form two two-digit numbers, and perform arithmetic operations on the two two-digit numbers and the preset custom numbers according to the preset arithmetic rules to obtain a first digital key; for example, if the last four digits of the SN code are "3031", then combine them in pairs to get two two-digit numbers "30" and "31", assuming that the preset third custom number is 2 and the preset fourth custom number is 101, perform the following addition, subtraction, multiplication, and division operations on "30" and "31": , and then take the remainder of the obtained operation result with 101, and the result of taking the remainder here is used as the first digital key.

[0080] 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 string.

[0081] Step S2032 specifically includes:

[0082] If it is determined that the first digital key is less than the preset value, take the remainder of all even-numbered bytes of the SN code decrypted in step S202 with the first digital key, and take the integer of all odd-numbered bytes of the SN code decrypted in step S202 with the first digital key;

[0083] If it is determined that the first digital key is greater than the preset value, compare the size of all the even - numbered - byte SN codes decrypted in step S202 with the first digital key: If the result is greater, subtract the first digital key from all the even - numbered - byte SN codes decrypted in step S202; if the result is less, add the first digital key to all the even - numbered - byte SN codes decrypted in step S202, and do not process the odd - numbered bits of the SN code decrypted in step S202.

[0084] The data processed according to the comparison result between the first digital key and the preset value is sequentially composed into a new string, that is, the fourth string.

[0085] S204, the server host computer connects the encrypted information string of the unlocked terminal obtained by parsing with the fourth string obtained by the SN code arithmetic processing, and uses "|" as the separator to form the fifth string; and performs ASE encryption on the fifth string in reverse order with the second time key to obtain the primary key; add random strings with fixed digits before and after the primary key to generate the machine key.

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

[0087] Combined Figure 1 and Figure 4 As shown, after the manufacturer receives the machine code sent by the customer, input it into the server host computer and select the time zone where the customer is located, and then click the generate machine key button. The server host computer first removes the strings with fixed lengths at the front and back of the machine code, and then reverses the remaining string in order to obtain the third string (example: wBuHPYmyOem3tsDVegzN2Jy4ObiU02BVNlc3tZX3Nddh6ZHG3oZp9YKCnjdGRYj8iNRJWwh / rgKmZAPlYcbCyg==). Subsequently, add the month, week, and hour number of the current time where the customer is located, then multiply by the third custom number, and take the remainder with the fourth custom number to generate the second time key (example: 21).

[0088] Decrypt the second time key and the third string using the ASE algorithm. If the machine code sent by the customer is incorrect or the customer contacts the manufacturer after a delay after obtaining the machine code, the string format obtained after decryption is incorrect. 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 not sent with a delay, the string obtained after decryption consists of three parts: the first half is the encrypted information string of the customer's computer (unlock terminal) (example: a7ffc7c2865882e6e94f7f6e745549c3), separated by "|", and the second half is the SN number of the machine (example: 4356303253444647303031). At this time, the last four digits of the SN number are combined in pairs to form two two-digit numbers. After performing addition, subtraction, multiplication, and division on the two two-digit numbers with the agreed third custom number, take the remainder of the agreed fourth custom number to obtain the first digital key.

[0089] A preset value (such as 10) is set in advance. If the first digital key is less than 10, take the remainder of all even-byte positions of the SN number with respect to the first digital key, and take the integer part of all odd-byte positions of the SN number with respect to the first digital key; if the first digital key is greater than 10, compare all even-byte positions of the SN number with the first digital key. If it is greater, subtract the first digital key, if it is less, add the first digital key, and do not process the odd-byte positions. The processed bytes are sequentially combined to form a new string, that is, the fourth string (taking the first digital key less than 10 as an example, the obtained fourth string is: 030a000603080608000601). Combine the fourth string and the encrypted information string of the customer's computer parsed with "|" as the separator to form the fifth string, and sequentially reverse the fifth string and perform ASE encryption with the second time key to obtain the primary key (example: swsQZONWdTLrd / R0RnxkfPgb+IBcW / 4dUA2BL / rz1HqMP6EARO3f6 / V3ws0T2ZDDx0Qy / kslBOdzJwl6kQLBTA==).

[0090] Then add random strings with fixed digits before and after the primary key to generate the machine key (example: 96e7eswsQZONWdTLrd / R0RnxkfPgb+IBcW / 4dUA2BL / rz1HqMP6EARO3f6 / V3ws0T2ZDDx0Qy / kslBOdzJwl6kQLBTA==8affc), and the manufacturer sends the machine key to the customer.

[0091] In a possible embodiment, in step S3, the unlock terminal parses the machine key. If the SN code of the current laser, the device information of the current unlock terminal, and the current time information match the parsed information, the laser embedded end unlocks the current laser, including:

[0092] S301. The unlocking terminal unlocks and obtains the current time information of the current unlocking terminal, and generates a third time key according to the current time information in the manner of generating the first time key.

[0093] S302. The unlocking terminal removes the strings with fixed digits at the front and back of the machine key respectively to obtain a sixth string corresponding to the primary key.

[0094] The sixth string and the third time key are decrypted using ASE and reversed in order to obtain a seventh string, and it is judged whether the format of the seventh string is correct: if the format of the seventh string is correct, it is determined that the current time information of the current unlocking terminal matches the time information contained in the machine key successfully, indicating that it is within the valid unlocking time at this time.

[0095] 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.

[0096] 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 string of the unlocking terminal obtained from the decryption result of the machine key.

[0097] Specifically: The unlocking terminal obtains the device information of the current unlocking terminal, adds a preset custom string according to the device information of the current unlocking terminal, and encrypts it with an encryption tool (MD5) for 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.

[0098] If the comparison result is consistent, it is determined that the current unlocking terminal matches successfully, otherwise the unlocking fails.

[0099] S304. The laser embedding end performs arithmetic processing on the SN code of the current laser according to the preset arithmetic rule in step S203, and compares the processing result with the encrypted laser SN code obtained from the decryption result of the machine key: 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.

[0100] Specifically included:

[0101] The embedded end of the laser combines the last four digits of the SN code of the current laser in pairs to form two two-digit numbers. After performing the same addition, subtraction, multiplication, and division operations on the two two-digit numbers and a third custom number as in step S203, the remainder is taken with respect to a fourth custom number to obtain a second digital key. Compare the size of the second digital key with a preset value, and process the SN code of the current laser according to the comparison result to obtain a ninth string. Compare the ninth string with the encrypted SN code of the laser obtained from the seventh 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.

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

[0103] Combined with Figure 1 and Figure 5 As shown, the unlocking process of the client host computer and the laser embedded software is as follows:

[0104] The customer powers on the currently to-be-unlocked laser and opens the serial port connection of the client host computer. At this time, the client host computer and the embedded software perform a handshake. After the handshake is successful, the customer inputs the machine key provided by the manufacturer and clicks the unlock button.

[0105] At this time, the client host computer first removes the strings of fixed lengths at the front and back of the machine key to obtain a sixth string corresponding to the primary key (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 numbers, multiply by a third custom number, and take the remainder with respect to a fourth custom number to generate a third time key (example: 21). Decrypt the sixth string and the third time key using ASE, and reverse them in order to obtain a seventh string.

[0106] If the customer does not unlock the laser in a timely manner after receiving the machine key but delays for a period of time (beyond the specified unlocking time range), the third time key is incorrect, resulting in an incorrect format of the seventh string after unlocking. If the customer unlocks the laser in a timely manner within the specified unlocking time range after receiving the machine key, the seventh string consists of three parts: the first half is the encrypted information string of the customer's computer (example: a7ffc7c2865882e6e94f7f6e745549c3), separated by "|" in the middle, and the second half is the encrypted machine SN number (example: 030a000603080608000601);

[0107] Then, the client host computer will obtain the IP address, CPU ID, MAC address, and hard disk serial number on the current computer, combine the IP address, CPU ID, MAC address, and hard disk serial number with a custom string to form a new string, and encrypt this new string 5 times using MD5 to generate the eighth string (example: a7ffc7c2865882e6e94f7f6e745549c3). At this time, compare the eighth string with the encrypted information string of the client host computer obtained by decryption. If the results are inconsistent, it indicates that the computer has been replaced 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 indicates that the customer has not replaced the computer in the middle.

[0108] At this time, the server host computer will add a fixed number of random strings (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 fixed number of random strings at the back to obtain the encrypted machine SN number obtained by parsing (example: 030a000603080608000601). The embedded software performs arithmetic processing on the SN code of the current laser according to the preset arithmetic rules in step S203, combines the last four digits of the SN number saved inside the MCU chip in pairs to form two two-digit numbers, performs addition, subtraction, multiplication, and division on the two two-digit numbers with a third custom number agreed upon, and then takes the remainder with respect to a fourth custom number agreed upon to obtain the second digital key.

[0109] If the second digital key is less than the preset value (for example, 10), take the remainder of all even-byte positions of the SN number with respect to the second digital key, and take the integer part of all odd-byte positions of the SN number with respect to the second digital key. If the second digital key is greater than 10, compare all even-byte positions of the SN number with the second digital key. If it is greater, subtract the second digital key; if it is less, add the second digital key, and do not process the odd-byte positions. The processed data is sequentially combined into a new string, that is, the ninth string (taking the second digital key less than 10 as an example, the obtained ninth string is: 030a000603080608000601).

[0110] Then, the embedded software of the laser will compare the ninth string with the encrypted machine SN number obtained by parsing: If they are inconsistent, it indicates that the laser from which the customer obtained the machine code is not the same as the laser to be unlocked, and the unlocking fails. The customer should contact the manufacturer again. If they are consistent, it indicates that the laser from which the customer obtained the machine code is the same as the laser to be unlocked, and the unlocking is successful. Subsequently, the customer can use the laser normally. Whether the unlocking is successful or failed, the unlocking button on the client host computer is locked and cannot be clicked again. There is no further unlocking function, and subsequent unlocking requires contacting the manufacturer.

[0111] Figure 1 shows the composition structure of a remote unlocking system for a Q-switch laser provided by an embodiment of the present invention. As Figure 1 shown, a remote unlocking system for a Q-switch laser includes a laser embedding end, an unlocking terminal, and a server host computer. The laser embedding end is communicatively connected to the unlocking terminal, and the unlocking terminal is communicatively connected to the server host computer, where:

[0112] The laser embedding end is used to pre-store the SN code of the corresponding laser and control the corresponding laser;

[0113] The unlocking terminal is used to query the SN code of the laser to be unlocked from the laser embedding end 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;

[0114] 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;

[0115] The unlocking terminal is further used to parse the machine key and confirm whether the device information and the current time information of the current unlocking terminal match the parsed information;

[0116] The laser embedding end is further used to control the unlocking of the current laser when it is confirmed that the device information and the current time information of the current unlocking terminal match the parsed information and further determine that the SN code of the current laser matches the parsed information.

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

[0118] Please refer to Figure 6 , Figure 6 which is a schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention. As Figure 6 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 on the memory 610 and executable on the processor 620. When the processor 620 executes the computer program 611, the following steps are implemented:

[0119] 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;

[0120] Generate a machine key according to the machine code and the time zone where the unlocking terminal is located;

[0121] Parse 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, unlock the current laser.

[0122] Please refer to Figure 7 , Figure 7 , which is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As Figure 7 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:

[0123] 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;

[0124] Generate a machine key according to the machine code and the time zone where the unlocking terminal is located;

[0125] Parse 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, unlock the current laser.

[0126] A method, system, electronic device, and storage medium for remotely unlocking a Q-switched laser provided by an embodiment of the present invention can easily implement the decryption operation of the laser device, and can achieve one-to-one precise decryption within a limited time period according to the time where the laser is located and the device information of the corresponding unlocking terminal of the laser, so that the decryption key for each laser in each time period is different, avoiding the situation of unlocking multiple machines with one key. The solution of the present invention can realize one-code-one-machine decryption at different locations and at the same time period 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 and expires, each key can only be used once, and each machine can only be decrypted once, improving the decryption accuracy and security of the laser.

[0127] It should be noted that in the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailedly described in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0128] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt 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.

[0129] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows 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 the processors of general-purpose computers, special-purpose computers, embedded computers, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 one block or more blocks.

[0130] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 one block or more blocks.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or more flows and / or blocks Figure 1 one block or more blocks.

[0132] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic inventive concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0133] Obviously, those skilled in the art can make various changes and variations 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 equivalent technologies, 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; specifically including: 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 querying, and performing encryption processing in combination with the first time key to generate a machine code; 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: The device information of the unlocking terminal includes multiple items of the IP address, CPUID, MAC address, and hard disk serial number of the current unlocking terminal.

3. A remote unlocking method for a Q-switched laser according to claim 2, 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.

4. A remote unlocking method for a Q-switched laser according to any one of claims 2 to 3, 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.

5. The remote unlocking method of a Q-switched laser according to claim 1, 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.

6. A remote unlocking method for a Q-switched laser according to claim 5, 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.

7. A remote unlocking method for a Q-switched laser according to claim 6, 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.

8. A remote unlocking method for a Q-switched laser according to any one of claims 5 to 7, 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.

9. 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; specifically including: 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; Encrypting the device information of the unlocked terminal to generate a first primary ciphertext; Processing the real-time time information of the unlocking terminal to generate a first time key; The first primary ciphertext is connected with the SN code obtained by query, and encrypted with the first time key to generate a machine code; 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

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

    CN109905235A