Method and apparatus for generating activation code of medical device, and electronic device

By encrypting and multi-layering the identification of medical devices to generate activation codes, the problem of insufficient security in existing technologies is solved, achieving high security and uniqueness of activation codes, and flexibility to adapt to different security requirements.

CN122160062APending Publication Date: 2026-06-05WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
Filing Date
2026-02-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods for generating activation codes for medical devices suffer from insufficient security, weak reliance on uniqueness, poor resistance to reverse engineering, and a flat verification logic, making it difficult to meet the security verification requirements of offline environments.

Method used

By encrypting the identity of medical devices, sampling information from the ciphertext, constructing a transformation matrix and generating a numerical sequence, and finally generating an activation code, the process involves multiple layers of processing, including sampling rules, character to numerical conversion, weighting operations, and matrix transformations.

Benefits of technology

The security, reliability, and flexibility of activation codes have been improved, and their anti-cracking capabilities have been enhanced to ensure the uniqueness of activation codes generated for each device and prevent counterfeiting and abuse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160062A_ABST
    Figure CN122160062A_ABST
Patent Text Reader

Abstract

The application provides a medical device activation code generation method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining an identity of a medical device, encrypting the identity to obtain ciphertext; sampling the ciphertext to obtain sampling information, and converting characters in the sampling information into numerical values; constructing a transformation matrix based on the numerical values; obtaining a numerical sequence based on the transformation matrix; and generating an activation code for the medical device based on the numerical sequence, which can improve the security, reliability and flexibility of the generated activation code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of medical device technology, and in particular relates to a method, apparatus and electronic device for generating activation codes for medical devices. Background Technology

[0002] In the field of medical devices, activation codes are a crucial element for ensuring the safe use and legal authorization of devices, making the reliability and security of their generation methods paramount. Currently, common activation code or unique verification code generation technologies suffer from numerous drawbacks. Directly using hash algorithms (such as MD5 or SHA series) or simple rule operations (such as modulo, segmented summation, character mapping) to generate codes makes them susceptible to forgery through collision testing or pattern analysis. Conversely, directly using long encrypted strings or arbitrarily truncated strings results in lengthy and unusable verification codes, or a lack of structured processing leading to compromised information integrity and anti-counterfeiting strength. These traditional solutions generally suffer from insufficient security, weak reliance on uniqueness, poor reverse engineering capabilities, and flat verification logic. Single-layer processing without the introduction of encrypted structured encoding and transformation mechanisms makes the generated activation codes easily cracked through enumeration, failing to meet the security verification requirements of offline environments. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, apparatus, and electronic device for generating activation codes for medical devices, which can improve the security, reliability, and flexibility of the generated activation codes.

[0004] In a first aspect, embodiments of this application provide a method for generating an activation code for a medical device, comprising:

[0005] Obtain the identification identifier of the medical device, and encrypt the identification identifier to obtain ciphertext; Sample information is obtained by sampling the ciphertext, and the characters in the sample information are converted into numerical values; Construct a transformation matrix based on the stated values; A numerical sequence is obtained based on the transformation matrix; The activation code for the medical device is generated based on the numerical sequence.

[0006] In some embodiments, sampling information is obtained from the ciphertext, including: Sampling information is obtained from the ciphertext based on a preset sampling rule, wherein the sampling rule includes the number of sampling characters at each sampling position, and the sampling position includes at least one of the head, middle and tail of the sampling information.

[0007] In some embodiments, converting the characters in the sampled information into numerical values ​​includes: The characters in the sampled information are matched with the characters in the standard numerical table, wherein the standard numerical table includes the correspondence between characters and numerical values; The sampled information is converted into numerical values ​​based on the matching results.

[0008] In some embodiments, obtaining the numerical sequence based on the transformation matrix includes: Numerical values ​​are extracted from the transformation matrix based on a preset reading path to obtain a numerical sequence.

[0009] In some embodiments, the transformation matrix includes multiple rows of values, the multiple rows including: an adjacent first row and a second row, and the reading path includes: a serpentine reading path, wherein the serpentine reading path reads values ​​from left to right for the first row and from right to left for the second row, or reads values ​​from right to left for the first row and from left to right for the second row.

[0010] In some embodiments, generating the activation code for the medical device based on the numerical sequence includes: Obtain the weight corresponding to each value in each numerical sequence; Multiply each value by its corresponding weight to obtain the first calculation result for each value; Add the first calculation result to obtain the second calculation result; The activation code for the medical device is obtained based on the second calculation result.

[0011] In some embodiments, obtaining the activation code for the medical device based on the second calculation result includes: Obtain the preset number of digits of the activation code; The conversion method is determined based on the preset number of bits; Based on the conversion method, the second calculation result is converted into an activation code of a preset number of bits.

[0012] In some embodiments, obtaining the weights corresponding to each value in each numerical sequence includes: Determine the number of values ​​in the numerical sequence; A predetermined number of prime numbers are used as the weights of each value, wherein the number is equal to the predetermined number.

[0013] Secondly, embodiments of this application provide an apparatus for generating activation codes for medical devices, comprising: The first acquisition module is used to acquire the identity identifier of the medical device and encrypt the identity identifier to obtain ciphertext; The first conversion module is used to sample information from the ciphertext and convert the characters in the sample information into numerical values. A construction module is used to construct a transformation matrix based on the numerical values; The module is used to obtain a numerical sequence based on the transformation matrix; A generation module is used to generate an activation code for the medical device based on the numerical sequence.

[0014] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the methods described above.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.

[0016] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes an electronic device to execute any of the methods described above.

[0017] The beneficial effects of the embodiments in this application compared with the prior art are: This application provides a method for generating activation codes for medical devices. The method involves obtaining the identification identifier of the medical device, encrypting the identifier to obtain ciphertext, sampling information from the ciphertext, and converting the characters in the sampling information into numerical values. A transformation matrix is ​​constructed based on the numerical values. A numerical sequence is obtained based on the transformation matrix. The activation code for the medical device is generated based on the numerical sequence. This method improves the security, reliability, and flexibility of the generated activation code. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A schematic diagram illustrating the implementation process of a method for generating activation codes for medical devices provided for the purposes of this application; Figure 2 A schematic diagram illustrating the implementation process of step S105 provided in an embodiment of this application; Figure 3 A schematic diagram of the structure of an activation code generation device for a medical device provided in an embodiment of this application; Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0021] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0022] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0023] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once detected," or "in response to detection."

[0024] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0025] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0026] To address the problems in related technologies, this application provides a method for generating activation codes for medical devices that can be applied to electronic devices, including: mobile phones, tablets, wearable devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The method for generating activation codes for medical devices provided in this application can be implemented using the processor of the electronic device.

[0027] Figure 1 A schematic diagram illustrating the implementation process of a method for generating activation codes for medical devices provided for the purposes of this application is shown below. Figure 1 As shown, the methods for generating activation codes for medical devices include: Step S101: Obtain the identification identifier of the medical device and encrypt the identification identifier to obtain ciphertext.

[0028] In this embodiment, the medical device identifier is specific information used to uniquely identify each medical device, such as the device's serial number (SN), MAC address, or specific hardware identification code. The identifier acts like an "ID card" for the device, accurately distinguishing different individual medical devices. The ciphertext is data processed using an encryption algorithm, as opposed to the original plaintext. The ciphertext is not directly readable; it can only be restored to its original form using a corresponding decryption algorithm and key.

[0029] In this embodiment, the device's identity identifier can be obtained through the medical device's hardware interface, system software, or a specific identifier reading tool. Then, a suitable encryption algorithm and encryption key are selected to encrypt the identity identifier. Encryption algorithms may include Advanced Encryption Standard (AES), Data Encryption Standard (DES), RSA, etc. The encryption process typically involves converting the identity identifier into binary data, and then performing a series of mathematical operations according to the rules of the encryption algorithm to finally obtain the ciphertext.

[0030] For example, encryption can be performed using AES 256, with the key 42124838e511223388ad8bdb62b66323. The resulting ciphertext is: d7454406c7235c8dbb2e874d796acfb81ca33f5342b9617fbbf55b7abb22ff8f.

[0031] Step S102: Sample information is obtained from the ciphertext, and the characters in the sample information are converted into numerical values.

[0032] In this embodiment, the sampling information is a portion of data selected from the ciphertext according to certain rules. The sampling information retains some features of the ciphertext while reducing the data volume, facilitating subsequent processing. The numerical value represents a quantity; the characters in the sampling information can be converted into numerical form according to certain rules for mathematical operations and matrix construction.

[0033] In this embodiment, sampling rules can be determined, such as selecting a certain number of characters from the beginning, middle, end, or random positions of the ciphertext as sampling information. The number of samples can be adjusted according to actual needs and security requirements.

[0034] For example, 5 characters are selected from the head, middle and tail of the ciphertext as sampling information, and the sampling information is: d7454+b81ca+2ff8f.

[0035] In this embodiment, various conversion methods can be used, such as ASCII code conversion, custom character-value mapping tables, etc., to convert each character in the sampled information into its corresponding value according to the selected conversion rules.

[0036] Following the example above, taking ASCII code conversion as an example, each character in the sampled information can be converted into a numerical value. Table 1 is a conversion illustration table provided by an embodiment of this application, as shown in Table 1: Table 1 is a conversion illustration provided in the embodiments of this application. character numerical values character numerical values character numerical values d 100 7 55 4 52 5 53 4 52 b 98 8 56 1 49 c 99 a 97 2 50 f 102 f 102 8 56 f 102 It can be determined that the character d corresponds to the ASCII value 100, 5 corresponds to the ASCII value 53, 8 corresponds to the ASCII value 56, and so on.

[0037] Following the example above, the sampled information converted to numerical values ​​is: 100, 55, 52, 53, 52, 98, 56, 49, 99, 97, 50, 102, 102, 56, 102.

[0038] Step S103: Construct the transformation matrix based on numerical values.

[0039] In this embodiment, the transformation matrix is ​​a rectangular array of numerical values ​​arranged according to certain rules. The transformation matrix is ​​used to further process the transformed numerical values, increasing the complexity and security of activation code generation.

[0040] In this embodiment, the number of rows and columns of the transformation matrix can be determined and set reasonably according to the number of values ​​and security requirements. The transformed values ​​are then filled into the transformation matrix in a certain order. Sequential filling, random filling, or filling according to a specific algorithm can be used.

[0041] Continuing with the example above, the transformation matrix of size 5x3 can be represented as: .

[0042] Step S104: Obtain the numerical sequence based on the transformation matrix.

[0043] In this embodiment, the numerical sequence is a set of values ​​extracted from the transformation matrix in a certain order. The numerical sequence is the direct data source for generating the activation code, and its order and combination of values ​​determine the specific form of the activation code.

[0044] In this embodiment, a reading path for extracting values ​​from the transformation matrix can be determined, such as row-major, column-major, or serpentine reading. Values ​​are extracted from the transformation matrix sequentially according to the selected reading path to form a numerical sequence. The selected values ​​can be some or all of the values ​​in the transformation matrix.

[0045] Continuing with the example above, taking a snake-shaped reading path as an example, a snake-shaped reading path reads values ​​from left to right for the first row and from right to left for the second row, or reads values ​​from right to left for the first row and from left to right for the second row.

[0046] The following is a serpentine path: Row 1: From left to right (0,0) -> (0,1) -> (0,2); Row 2: From right to left (1,2) -> (1,1) -> (1,0); Row 3: From left to right (2,0) -> (2,1) -> (2,2); Row 4: From right to left (3,2) -> (3,1) -> (3,0); Row 5: From left to right (4,0) -> (4,1) -> (4,2); In the coordinates (X, Y), X represents the row, Y represents the Y-th value in the X-row, and (0,0) corresponds to the value 100. The numerical sequence obtained through the above path is: 100, 55, 52, 98, 52, 53, 56, 49, 99, 102, 50,97, 102, 56, 102.

[0047] Step S105: Generate activation code for medical device based on numerical sequence.

[0048] In this embodiment, the activation code is a specific set of codes used to activate the medical device, typically consisting of letters, numbers, or symbols. The activation code serves as proof of legal use of the medical device; only by entering the correct activation code can the device function properly.

[0049] In this embodiment, various methods can be used to convert numerical sequences into activation codes. For example, the numerical values ​​can be converted according to a certain base (such as hexadecimal) and then combined into a string; or specific mathematical operations can be performed on the numerical values ​​(such as summation, modulo, etc.), and then an activation code can be generated based on the result. Further encoding processing, such as Base64 encoding, can be applied to the generated activation code to increase its complexity and security.

[0050] Continuing with the example above, we can use the first 15 prime numbers as weights: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]. The weighted sum is calculated as: (100×2) + (55×3) + (52×5) + (98×7) + (52×11) + (53×13) + (56×17) + (49×19) + (99×23) + (102×29) + (50×31) + (97×37) + (102×41) + (56×43) + (102×47) = 26213. In this embodiment, 26213 can be the activation code.

[0051] In some embodiments, the calculated value can be converted to obtain an activation code.

[0052] The method provided in this application encrypts the identity identifier of a medical device to obtain ciphertext, making it difficult for attackers to directly obtain the original identity information of the device and increasing the difficulty of cracking the activation code. Even if an attacker obtains the ciphertext, without the correct decryption key and algorithm, they cannot reconstruct the identity identifier, thus enhancing security. From ciphertext sampling, character value conversion, construction of transformation matrix to generation of numerical sequence, each step increases the complexity and randomness of the data. It is difficult for attackers to deduce the generation rules of the activation code by reverse engineering these steps, thereby effectively preventing the activation code from being forged. Since the generation of the activation code is based on the unique identity identifier of the medical device, the activation code generated for each device can be unique. This ensures that only legitimate devices can use the corresponding activation code for activation, avoiding the reuse and abuse of activation codes. By selecting partial information from the ciphertext through the sampling process, the amount of data that attackers can exploit is reduced. The process of constructing the transformation matrix and generating the numerical sequence further obfuscates and transforms the data, making it difficult for attackers to infer the entire generation logic of the activation code by analyzing partial data, thus improving the system's resistance to various attacks (such as brute-force attacks, statistical analysis attacks, etc.). Parameters can be adjusted at each step according to actual needs, such as the selection of encryption algorithms, the formulation of sampling rules, the size and padding method of the transformation matrix, and the method for generating activation codes. This makes the method adaptable to different types of medical devices with different security requirements, exhibiting strong flexibility and scalability.

[0053] In some embodiments, step S102 can be implemented by the following steps: Step S1021: Sample information is obtained from the ciphertext based on a preset sampling rule. The sampling rule includes the number of sampled characters at each sampling position. The sampling position includes at least one of the head, middle, and tail of the sampled information.

[0054] In this embodiment, the preset sampling rules are a set of pre-determined criteria and specifications for selecting sampling information from ciphertext. They specify the specific sampling method, including key information such as which positions in the ciphertext to sample from and the number of characters to be selected at each sampling position, providing clear guidance for the sampling process. The number of sampled characters refers to the number of characters to be selected from the ciphertext at each sampling position. This number can be flexibly set according to actual needs and security requirements; different sampling positions can have the same or different number of characters. A sampling position is a specific area in the ciphertext used to select sampling information, including the beginning, middle, and end. These positions are relative to the entire ciphertext; sampling at different positions allows for the acquisition of information from different parts of the ciphertext, increasing the diversity and randomness of the sampled information.

[0055] In this embodiment, the start and end positions of the ciphertext are first defined. For ciphertext data stored in a computer, its range can be determined using pointers or indexes in a data structure. The specific positions of the header, middle, and tail are determined according to preset rules. For example, if the ciphertext length is n, the header can be defined as the first m1 characters (m1 is the number of header sampled characters), and the middle can be from the (m1+1)th character to the nth character. The m2 characters are selected at a certain position between m2 characters (m2 is the number of characters sampled in the middle), and the last m3 characters are selected at the end (m3 is the number of characters sampled at the end).

[0056] In this embodiment, at the determined sampling positions, a preset number of sampling characters are selected. This can be achieved using string manipulation functions or array indexing. For example, in programming languages, if the ciphertext is stored as a string, the `substring` function (the function name may differ in different languages) can be used to extract characters at corresponding positions. The characters selected from different sampling positions are combined in a certain order to form the final sampling information. The order can be determined according to actual needs, such as the beginning, then the middle, and finally the end.

[0057] The method provided in this application sampled from multiple positions, including the head, middle, and tail of the ciphertext, ensuring that the sampled information contained information from different parts of the ciphertext. This makes it difficult for attackers to deduce the sampled information by analyzing only parts of the ciphertext, increasing the difficulty of cracking. Because attackers do not know the sampling rules and the specific distribution of the sampling positions, they cannot launch targeted attacks. Each sampling position can be configured with a different number of sampled characters, further increasing the randomness and complexity of the sampled information. Different combinations of sampled character counts make the sampled information more diverse, making it more difficult for attackers to crack the sampling rules and activation code generation mechanism through statistical analysis. The preset sampling rules can be flexibly customized according to different medical devices, security requirements, and application scenarios. For example, for devices with high security requirements, the number of sampling positions or the number of sampled characters can be increased; for some simple application scenarios, the sampling complexity can be appropriately reduced. This flexibility allows the method to adapt to various needs. If the sampling rules need to be adjusted or updated, only the preset rules need to be modified, without requiring large-scale changes to the entire activation code generation method. This enables the system to respond promptly to potential security threats or changes in business requirements. By sampling from multiple locations within the ciphertext, the sampled information can more comprehensively reflect the characteristics of the ciphertext. Compared to sampling from only one location, multi-location sampling avoids the unrepresentative nature of the sampled information due to the special characteristics of a certain part of the ciphertext, thus ensuring the accuracy and reliability of the activation code subsequently generated based on the sampled information.

[0058] In some embodiments, step S102 may include: Step S1022: Match the characters in the sampled information with the characters in the standard value table, wherein the standard value table includes the correspondence between characters and values.

[0059] In this embodiment, the standard numeric table is a predefined table that records in detail the correspondence between characters and numeric values. This table provides explicit mapping rules for the conversion from characters to numeric values, ensuring that different characters can be accurately converted into their corresponding numeric values. The standard numeric table can be the ASCII code table.

[0060] In this embodiment, each character can be extracted sequentially, starting from the first character of the sampled information. A loop structure can be used to implement the traversal operation. For each extracted sampled character, a search is performed in the standard value table. This can be done by traversing the character list in the standard value table, or by using a more efficient search algorithm (such as hash table lookup, if the standard value table is stored in a suitable data structure) to find the entry that matches the sampled character. If a matching character is found, its position or corresponding numerical information in the standard value table is recorded for later use; if no matching character is found, processing can be performed according to specific needs, such as reporting an error, skipping the character, or assigning a default value.

[0061] Step S1023: Convert the sampled information into numerical values ​​based on the matching results.

[0062] In this embodiment, the extracted numerical values ​​corresponding to each character are combined according to certain rules to form the final numerical result. The combination rules can be determined according to actual needs. For example, the numerical values ​​can be concatenated sequentially to form a larger value, or a certain mathematical operation (such as weighted summation) can be performed to obtain the final value.

[0063] The method provided in this application provides a unified and clear rule for character-to-numerical conversion by using a standard numerical table. Regardless of the characters in the sampled information, the conversion is performed according to this fixed standard, avoiding confusion and errors caused by inconsistent conversion rules. This ensures consistent numerical results for the same sampled information in different systems, devices, or application scenarios. The character-to-numerical correspondence in the standard numerical table can be flexibly customized according to actual needs. For example, the correspondence can be designed based on different business logic, security requirements, or data characteristics, so that the converted values ​​better meet specific application requirements. Whether it is letters, numbers, symbols, or other special characters, conversion to numerical values ​​can be achieved by defining corresponding standard numerical tables. This makes the method highly versatile and capable of handling various types of sampled information.

[0064] In some embodiments, Figure 2 This application provides a schematic diagram of the implementation process of step S105, as shown in the embodiment. Figure 2 As shown, step S105 can be achieved through the following steps: Step S1051: Obtain the weight corresponding to each value in each numerical sequence.

[0065] In this embodiment, the weight is a pre-defined coefficient for each value in the numerical sequence, used to measure the importance of that value in the activation code generation process. Different values ​​can be assigned different weights, and the value of the weight can be determined according to actual needs and application scenarios. The weights can be the same or different, and can be prime numbers.

[0066] In this embodiment of the application, a set of weight allocation rules can be pre-defined based on factors such as the type, function, and safety level of the medical device, and the weight can be obtained after obtaining the numerical sequence.

[0067] In some embodiments, the number of values ​​in the numerical sequence can be determined; the first preset number of prime numbers are used as the weights of each value, where the number is equal to the preset number. Continuing with the example above, if the number is 15, then the first 15 prime numbers are used as weights: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47].

[0068] Step S1052: Multiply each value by its corresponding weight to obtain the first calculation result corresponding to each value.

[0069] In this embodiment of the present application, for each value, the corresponding weight is obtained from the weight storage structure according to its index, and then the value is multiplied by the weight to obtain the first calculation result.

[0070] Step S1053: Add the first calculation result to obtain the second calculation result.

[0071] In this embodiment of the application, the first calculation results can be added together to obtain the second calculation result.

[0072] Step S1054: Obtain the activation code for the medical device based on the second calculation result.

[0073] In this embodiment of the application, the converted data is combined into an activation code according to a predetermined activation code format rule. The activation code format can be pure numbers, a mixture of numbers and letters, etc.

[0074] The method provided in this application assigns different weights to each value in a numerical sequence, allowing different combinations of values ​​to contribute differently to the generation of activation codes. Even if two numerical sequences contain the same values, the generated activation codes will differ due to the different weight assignments, significantly increasing the uniqueness of the activation codes. The complex process involving multiplication and addition makes it difficult for attackers to crack the activation code generation rules through simple reverse reasoning, improving the security of the activation codes and effectively preventing forgery or tampering. The weights can be flexibly adjusted according to the different characteristics, application scenarios, or security requirements of medical devices. For example, for newly launched devices or devices with higher security requirements, the weights can be reallocated to generate activation codes that better meet the needs without requiring large-scale modifications to the entire generation algorithm. This method does not depend on a specific numerical sequence length or range and can handle numerical sequences in various situations, exhibiting strong versatility and adaptability. By multiplying and adding the values ​​with their weights, the importance of all values ​​in the numerical sequence is comprehensively considered, enabling the generated activation codes to more accurately reflect the characteristics and related parameters of the device, ensuring the rationality and effectiveness of the activation codes. The entire generation process is based on explicit mathematical operations and preset rules, making it controllable and repeatable. When you need to regenerate or verify an activation code, you can follow the same steps to ensure consistent results.

[0075] In some embodiments, step S1054 can be implemented by the following steps: Step S541: Obtain the preset number of digits for the activation code.

[0076] In this embodiment, the preset number of digits refers to the number of characters that the activation code should contain in a pre-defined manner. This is a clear specification of the activation code length. Different medical devices or application scenarios may have different requirements for the number of digits in the activation code. For example, some devices may require an activation code of 8 digits, some may require 8 digits, and some may require 4 digits. The preset number of digits can be in the range of 4 to 10 digits.

[0077] Step S542: Determine the conversion method based on the preset number of bits.

[0078] In this embodiment, the conversion method is a specific method for converting the second calculation result (usually a numerical value) into an activation code that meets the required number of bits, determined according to a preset number of bits. Common conversion methods include number system conversion, truncating a portion of the numerical value, and concatenating fixed characters.

[0079] Following the example above, convert 26213 to a 5-digit base-36 number.

[0080] Step S543: Convert the second calculation result into an activation code of a preset number of bits based on the conversion method.

[0081] Continuing with the example above, 26213 ÷ 36 = 728 remainder 5 → (5); 728 ÷ 36 = 20 remainder 8 → (8); 20 ÷ 36 = 0 remainder 20 → (20 → 'k'); Fill with zeros at the high end → (0, 0); The activation code you will get is: 00k85.

[0082] This activation code can then be used to activate medical devices.

[0083] In some embodiments, the method may further include sending an activation code to a medical device to activate the medical device.

[0084] The method provided in this application embodiment generates ciphertext by AES encryption of the unique serial number, extracts the representative first, middle and last three segments of characters from it and converts them into an ASCII matrix, and then generates a concise verification code through a specific matrix transformation. This improves the uniqueness, randomness and anti-counterfeiting ability of the activation code from the source, while solving the problem that long ciphertexts are inconvenient to use directly.

[0085] The method provided in this application offers significant technical advantages, including high security, strong uniqueness, convenient verification, and resistance to reverse engineering. Through a multi-layered information processing mechanism, it not only ensures that each SN corresponds to a unique and unpredictable activation code, but also significantly enhances the complexity and design flexibility of the activation code using matrix structuring and transformation logic. This makes it convenient for user input and system verification while effectively resisting security threats such as brute-force enumeration, simple guessing, and reverse engineering. It has good application value and feasibility in scenarios such as software licensing, device activation, and digital content protection.

[0086] The method provided in this application avoids the potential biases caused by sampling only the head (which may contain specific format information) or the tail. By sampling the first, middle, and last segments of the ciphertext, it more comprehensively captures the overall characteristics of the encryption result, ensuring the representativeness and uniformity of the sampled information and improving the computational dimension: it elevates the problem from the string processing domain to the matrix operation domain, making it possible to apply mathematical transformations; the matrix's row and column structure allows for highly flexible and covert transformation logic (such as reading paths and operation rules), greatly increasing the difficulty of reverse engineering; it uniformly converts characters into ASCII code values, facilitating mathematical operations and laying the foundation for subsequent numerical transformations; it ultimately generates a code of appropriate length, providing an excellent user experience; it has high correlation: the short code is obtained through multiple transformations and has a strong and unique correlation with the original SN; the transformation algorithm can be used as a core secret (equivalent to secondary encryption), making it difficult for attackers to deduce the rules of matrix transformation even if they obtain a large number of SN-activation code pairs, effectively preventing mass forgery; and it is verification-friendly: during verification, only the same process needs to be repeated to determine whether the activation code was generated by a legitimate SN through the correct process.

[0087] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0088] According to the foregoing embodiments, this application provides an activation code generation device for medical devices. The various modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0089] This application provides an apparatus for generating activation codes for medical devices. Figure 3 This is a schematic diagram of the structure of a device for generating activation codes for medical devices provided in an embodiment of this application, as shown below. Figure 3 As shown, the activation code generation device 300 for medical devices includes: The first acquisition module 301 is used to acquire the identity identifier of the medical device and encrypt the identity identifier to obtain ciphertext; The first conversion module 302 is used to sample information from the ciphertext and convert the characters in the sample information into numerical values. Construction module 303 is used to construct a transformation matrix based on the numerical values; Module 304 is used to obtain a numerical sequence based on the transformation matrix; The generation module 305 is used to generate the activation code of the medical device based on the numerical sequence.

[0090] In some embodiments, the first conversion module 302 includes: The sampling method is used to sample information from the ciphertext based on a preset sampling rule. The sampling rule includes the number of sampling characters at each sampling position, and the sampling position includes at least one of the head, middle, and tail of the sampling information.

[0091] In some embodiments, the first conversion module 302 includes: A matching unit is used to match the characters in the sampled information with the characters in a standard numerical table, wherein the standard numerical table includes the correspondence between characters and numerical values; A conversion unit is used to convert the sampled information into numerical values ​​based on the matching results.

[0092] In some embodiments, obtaining the numerical sequence based on the transformation matrix includes: Numerical values ​​are extracted from the transformation matrix based on a preset reading path to obtain a numerical sequence.

[0093] In some embodiments, the transformation matrix includes multiple rows of values, the multiple rows including: an adjacent first row and a second row, and the reading path includes: a serpentine reading path, wherein the serpentine reading path reads values ​​from left to right for the first row and from right to left for the second row, or reads values ​​from right to left for the first row and from left to right for the second row.

[0094] In some embodiments, the generation module includes: The acquisition unit is used to acquire the weights corresponding to each value in each numerical sequence. The first calculation unit is used to multiply each value by its corresponding weight to obtain the first calculation result corresponding to each value. The second calculation unit is used to add the first calculation result to obtain the second calculation result; The obtaining unit is used to obtain the activation code of the medical device based on the second calculation result.

[0095] In some embodiments, the obtaining unit includes: A subunit is used to obtain a preset number of digits of the activation code; A subunit is defined to determine the conversion method based on the preset number of bits; The conversion subunit is used to convert the second calculation result into an activation code of a preset number of bits based on the conversion method.

[0096] In some embodiments, the acquiring unit includes: A quantity determination subunit is used to determine the quantity of values ​​in the numerical sequence; The weight determination subunit is used to use a preset number of prime numbers as the weight of each value, wherein the number is equal to the preset number.

[0097] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0098] In addition, the activation code generation device and postoperative prediction device of the medical device mentioned above can be a software unit, a hardware unit, or a combination of software and hardware. They can also be integrated into electronic devices as independent components, or exist as independent terminal devices.

[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0100] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device of this embodiment may include: at least one processor 30 ( Figure 4 Only one processor 30, memory 31, and computer program 32 stored in memory 31 and executable on at least one processor 30 are shown. When the processor 30 executes the computer program 32, it implements the steps in any of the above method embodiments, or the processor 30 executes the computer program 32 to implement the functions of each module / unit in the above device or system embodiments.

[0101] For example, computer program 32 may be divided into one or more modules / units, one or more of which are stored in memory 31 and executed by processor 30 to complete this application. One or more modules / units may be a series of computer program 32 instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in an electronic device.

[0102] This application provides a system for generating activation codes for medical devices, including: the electronic device and the ultrasound transceiver module described in the above embodiments, wherein the electronic device is communicatively connected to the ultrasound transceiver module.

[0103] This application also provides a computer-readable storage medium storing a computer program 32, which, when executed by a processor 30, implements the steps described in the above-described method embodiments.

[0104] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0105] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program 32 instructing related hardware. The computer program 32 can be stored in a computer-readable storage medium, and when executed by the processor 30, it can implement the steps of the various method embodiments described above. The computer program 32 includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a terminal, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0106] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0107] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0108] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0110] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for generating an activation code for a medical device, characterized in that, include: Obtain the identification identifier of the medical device, and encrypt the identification identifier to obtain ciphertext; Sample information is obtained by sampling the ciphertext, and the characters in the sample information are converted into numerical values; Construct a transformation matrix based on the stated values; A numerical sequence is obtained based on the transformation matrix; The activation code for the medical device is generated based on the numerical sequence.

2. The method according to claim 1, characterized in that, The sampling information obtained from the ciphertext includes: Sampling information is obtained from the ciphertext based on a preset sampling rule, wherein the sampling rule includes the number of sampling characters at each sampling position, and the sampling position includes at least one of the head, middle and tail of the sampling information.

3. The method according to claim 1, characterized in that, The step of converting the characters in the sampled information into numerical values ​​includes: The characters in the sampled information are matched with the characters in the standard numerical table, wherein the standard numerical table includes the correspondence between characters and numerical values; The sampled information is converted into numerical values ​​based on the matching results.

4. The method according to claim 1, characterized in that, The process of obtaining a numerical sequence based on the transformation matrix includes: Numerical values ​​are extracted from the transformation matrix based on a preset reading path to obtain a numerical sequence.

5. The method according to claim 4, characterized in that, The transformation matrix includes multiple rows of values, including: an adjacent first row and a second row. The reading path includes: a serpentine reading path, wherein the serpentine reading path reads values ​​from left to right for the first row and from right to left for the second row, or reads values ​​from right to left for the first row and from left to right for the second row.

6. The method according to claim 1, characterized in that, The process of generating the activation code for the medical device based on the numerical sequence includes: Obtain the weight corresponding to each value in each numerical sequence; Multiply each value by its corresponding weight to obtain the first calculation result for each value; Add the first calculation result to obtain the second calculation result; The activation code for the medical device is obtained based on the second calculation result.

7. The method according to claim 6, characterized in that, The process of obtaining the activation code for the medical device based on the second calculation result includes: Obtain the preset number of digits of the activation code; The conversion method is determined based on the preset number of bits; Based on the conversion method, the second calculation result is converted into an activation code of a preset number of bits.

8. The method according to claim 6, characterized in that, The step of obtaining the weight corresponding to each value in each numerical sequence includes: Determine the number of values ​​in the numerical sequence; A predetermined number of prime numbers are used as the weights of each value, wherein the number is equal to the predetermined number.

9. A device for generating activation codes for medical devices, characterized in that, include: The first acquisition module is used to acquire the identity identifier of the medical device and encrypt the identity identifier to obtain ciphertext; The first conversion module is used to sample information from the ciphertext and convert the characters in the sample information into numerical values. A construction module is used to construct a transformation matrix based on the numerical values; The module is used to obtain a numerical sequence based on the transformation matrix; A generation module is used to generate an activation code for the medical device based on the numerical sequence.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.