A software product licensing control method based on dynamic digital certificate
Through the software product license control method of dynamic digital certificate, a secondary development package is generated based on the control parameters of the software product version, and the detection logic is automatically read and completed to realize the licensing control of the software product, solving the problem of changing the license control method during software upgrades, and realizing the parallel use of new and old versions.
Patent Information
- Application Number
- CN202111086838.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-09-16
AI Technical Summary
In the prior art, the licensing control method needs to be changed during software upgrades, resulting in complex maintenance and management problems.
The software product license control method using dynamic digital certificates is used to generate a secondary development package based on the control parameters of the software product version, and the control parameters are stored in the authorization information in the certificate, and the detection logic is automatically read and completed to realize the licensing control of the software product.
When creating a new software version, new control parameters are introduced. The new control parameters carry the inspection logic. The generated software license does not affect each other and can be used in parallel, which solves the problem of changing the license control method during software upgrade.
Smart Images

Figure CN113886770B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of software license control methods and relates to a software product license control method of a dynamic digital certificate. Background Art
[0002] In order to protect their software products, software companies usually need to add a software license inspection module to the product, so that software users can only use some or all of the software functions after obtaining the digital license issued by the software company for the software product. The software company adds the license inspection code in the middle of the business code. When the business process runs to the corresponding business code, the software product inspection module is responsible for checking the validity of the digital license provided by the software user. Only when the restrictions defined in the software license are met can the normal business code continue. Usually, the restrictions defined by the software company include trial duration, number of uses, usage period, and functional modules used by users. In actual scenarios, the situation that affects the software product license control rules will be much more complicated. For example: there are multiple software product series maintained simultaneously within the software company, and these software products need the support of license control. The existing license control method is only applicable to one software, and the software company needs to maintain different restrictions in multiple software products; each software product also has restrictions that change during the version upgrade and iteration process. The new version of the software product will have more restrictions than the old version, and the license control method needs to be changed. Summary of the invention
[0003] The purpose of the present invention is to provide a software product license control method of a dynamic digital certificate, which solves the problem in the prior art that the existing license control method needs to be changed when the existing software is upgraded.
[0004] The technical solution adopted by the present invention is a software product license control method of a dynamic digital certificate, comprising the following steps:
[0005] Step 1: Generate a key pair based on the product information to be licensed;
[0006] Step 2: Determine the control parameters of the current version of the product to be licensed;
[0007] Step 3: Generate a development kit and certificate based on the key pair and control parameters of the current version of the product to be licensed;
[0008] Step 4: Write the inspection category of the inspection item according to the control parameters, select the detection category according to the inspection category, and obtain the corresponding overload method;
[0009] Step 5: First, add the initialization code of the development kit to the system startup part of the product to be licensed, and then add a checkpoint to the business logic method that needs to be checked in the product to be licensed;
[0010] Step 6: Run the checkpoint and output the check results.
[0011] The present invention is also characterized in that:
[0012] It also includes, before step 6, testing the function protected by the checkpoint. If an authorization error occurs, importing the certificate, retesting the function protected by the checkpoint, and the authorization error disappears, and the test is completed.
[0013] The product information to be licensed in step 1 includes the software name.
[0014] The specific process of step 3 is: use the key pair of the current version of the product to be licensed to encrypt the value corresponding to the control parameter to form a certificate, inject the type and name of the control parameter into the template, and modify the template file to a Java executable file to form a development package.
[0015] The overloaded methods in step 4 include setting the error information acquisition method, the checkpoint name acquisition method, and the detection method.
[0016] The specific detection method is: execute the verification logic of the certificate control parameters, return true to indicate that the verification of this checkpoint has passed, and return false to indicate that the verification of this checkpoint has not passed.
[0017] Step 6 specifically includes the following steps:
[0018] Step 6.1, initialize the product to be licensed, delete the historical failure record file, and wait for the product to be licensed to enter the checkpoint;
[0019] Step 6.2: Determine whether there is a historical failure record file and the certificate has not been updated. If yes, jump to 6.3; otherwise, jump to 6.4;
[0020] Step 6.3 creates a historical failure record file, throws out exception information, enters the license exception handling process, ends the call within the checkpoint, and outputs the check failure information;
[0021] Step 6.4, put the inspection conditions into the queue to be inspected;
[0022] Step 6.5: Determine whether there are any unfinished inspection conditions in the queue to be inspected. If all are completed, jump to 6.7; otherwise, jump to 6.6;
[0023] Step 6.6, select a check condition and execute it, and place the execution result in the result set;
[0024] Step 6.7, repeat steps 6.5-6.6 to obtain a result set containing all the check condition execution results;
[0025] Step 6.8: Determine whether there is an exception in the result set. If so, jump to 6.3; otherwise, output the check passed information.
[0026] The beneficial effects of the present invention are:
[0027] The present invention discloses a software product license control method of a dynamic digital certificate. A secondary development package is generated according to control parameters of a software product version. The control parameters correspond to authorization information stored in a certificate. The authorization information is automatically read from a software license according to the control parameters, and a detection logic is completed to realize the license control of the software product. When a new software version is created, new control parameters are introduced. The new control parameters carry the checking logic. The software license generated under this version does not affect the old version and can be used in parallel. The problem in the prior art that the license control method needs to be changed when the software is upgraded is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flow chart of a software product license control method of a dynamic digital certificate of the present invention;
[0029] Figure 2 The invention discloses a flow chart of a checking process in a software product license control method of a dynamic digital certificate. DETAILED DESCRIPTION
[0030] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] A software product license control method based on dynamic digital certificates, such as Figure 1 As shown, the following steps are included:
[0032] Step 1: Generate a key pair used for encryption and decryption of a product certificate according to the information of the product to be licensed, where the information of the product to be licensed includes the software name;
[0033] Step 2: Determine the control parameters of the current version of the product to be licensed. The control parameters can be set as default control parameters or customized as needed. The control parameters include attribute name, attribute type, attribute description and attribute value, which can be the authorization effective time, authorization expiration time, and MAC address of the deployment machine.
[0034] Step 3: Generate a development kit and certificate based on the key pair and control parameters of the current version of the product to be licensed; the certificates include development certificates, trial certificates, and product certificates, which can support three modes: development, trial, and product.
[0035] Specifically, the key pair of the current version of the product to be licensed is used to encrypt the value corresponding to the control parameter to form a certificate, the type and name of the control parameter are injected into the template, and the template file is modified into a Java executable file to form a development kit.
[0036] Furthermore, the development certificate is provided for developers to try out, and can only be run in the development environment, skipping all checkpoints by default; the trial certificate is provided for customers to experience product use, and only the default checkpoints (specified checkpoints) are executed, and the emergency behavior of the software product is automatically triggered after the certificate expires; the product certificate is provided to customers for use in the formal environment, and all checkpoints are effective. After the software product is delivered to the customer and deployed in the production environment, the trial certificate assigned when the software product is shipped will be automatically read. Customers can upload the product certificate generated by the system before the trial certificate expires and use all the functions constrained by the software license normally. After the certificate expires, the restricted functions of the software product will no longer be able to be used normally, and re-uploading a new certificate will allow the software product to continue to be used.
[0037] Step 4: Write the inspection category of the inspection item according to the control parameters, select the detection category according to the inspection category, and obtain the corresponding overload method;
[0038] The overloaded methods include: setting the method for obtaining error information, the method for obtaining the checkpoint name, and the detection method; the method for obtaining error information is set to return error information, the method for obtaining the checkpoint name returns the name of the current checkpoint, and the detection method executes the verification logic for the certificate control parameters. Returning true indicates that the checkpoint verification here passes, and returning false indicates that the checkpoint verification here fails. In the detection method, the verification logic obtains the control parameters saved in the certificate file after forcibly converting the object returned by getContent() into a CustomContent object.
[0039] Step 5: First, add the initialization code of the development kit to the system startup part of the product to be licensed, and then add checkpoints to the business logic methods that need to be checked in the product to be licensed. The way to add checkpoints is to use the annotation @LicenseCheck or add the execution code LicenseHelper.check(); the check items to be executed can be specified at any checkpoint;
[0040] After adding the checkpoint, test the function protected by the checkpoint. If an authorization error occurs, place the development certificate on the certificate path and retest the function protected by the checkpoint. The authorization error disappears and the development package integration is complete.
[0041] Step 6: Run the checkpoint and output the check results, such as Figure 2 As shown;
[0042] Step 6.1, initialize the product to be licensed, delete the historical failure record file, and wait for the product to be licensed to enter the checkpoint;
[0043] Step 6.2: Determine whether there is a historical failure record file and the certificate has not been updated. If yes, jump to 6.3; otherwise, jump to 6.4;
[0044] Step 6.3 creates a historical failure record file, throws out exception information, enters the license exception handling process, ends the call within the checkpoint, and outputs the check failure information;
[0045] Step 6.4, put the inspection conditions into the queue to be inspected;
[0046] Step 6.5: Determine whether there are any unfinished inspection conditions in the queue to be inspected. If all are completed, jump to 6.7; otherwise, jump to 6.6;
[0047] Step 6.6, select a check condition and execute it, and place the execution result in the result set;
[0048] Step 6.7, repeat steps 6.5-6.6 to obtain a result set containing all the check condition execution results;
[0049] Step 6.8: Determine whether there is an exception in the result set. If so, jump to 6.3; otherwise, output the check passed information.
[0050] Through the above manner, a software product license control method of a dynamic digital certificate of the present invention generates a secondary development package according to the control parameters of the software product version, the control parameters correspond to the authorization information stored in the certificate, and the authorization information is automatically read from the software license according to the control parameters, and the detection logic is completed to realize the license control of the software product; when a new software version is created, new control parameters are introduced, and the new control parameters carry the inspection logic. The software license generated under this version and the old version do not affect each other and can be used in parallel, which solves the problem of the need to change the license control method when the software is upgraded in the prior art.
Claims
1. A software product license control method based on dynamic digital certificates, characterized in that: The following steps are involved: Step 1: Generate a key pair based on the product information to be licensed; Step 2: Determine the control parameters of the current version of the product to be licensed; Step 3: Generate a development kit and a certificate according to the key pair and control parameters of the current version of the product to be licensed; The specific process is: using the key pair of the current version of the product to be licensed to encrypt the value corresponding to the control parameter to form a certificate, injecting the type and name of the control parameter into the template, and modifying the template file into a java executable file to form a development kit; Step 4: Write the inspection category of the inspection item according to the control parameters, select the detection category according to the inspection category, and obtain the corresponding overload method; The overloaded method includes setting a method for obtaining error information, a method for obtaining a checkpoint name, and a detection method; The detection method is specifically: executing the verification logic of the certificate control parameters, returning true to indicate that the verification of this checkpoint is passed, and returning false to indicate that the verification of this checkpoint is not passed; Step 5: First, add the initialization code of the development kit to the system startup part of the product to be licensed, and then add a checkpoint to the business logic method that needs to be checked in the product to be licensed; Step 6: Run the checkpoint and output the check result; The specific steps include: Step 6.1, initialize the product to be licensed, delete the historical failure record file, and wait for the product to be licensed to enter the checkpoint; Step 6.2: Determine whether there is a historical failure record file and the certificate has not been updated. If yes, jump to 6.3; otherwise, jump to 6.4; Step 6.3, create a historical failure record file, throw an exception message, enter the license exception handling process, end the call in the checkpoint, and output the check failure information; Step 6.4, put the inspection conditions into the queue to be inspected; Step 6.5: Determine whether there are any unfinished inspection conditions in the queue to be inspected. If all are completed, jump to 6.7; otherwise, jump to 6.6; Step 6.6, select a check condition and execute it, and place the execution result in the result set; Step 6.7, repeat steps 6.5-6.6 to obtain a result set containing all the check condition execution results; Step 6.8: Determine whether there is an exception in the result set. If so, jump to 6.3; otherwise, output the check passed information.
2. A software product license control method for dynamic digital certificates according to claim 1, characterized in that: It also includes, before step 6, testing the function protected by the checkpoint. If an authorization error occurs, importing the certificate, retesting the function protected by the checkpoint, and the authorization error disappears, and the test is completed.
3. The method for controlling software product license using a dynamic digital certificate according to claim 1, characterized in that: The product information to be licensed in step 1 includes the software name.
Citation Information
Patent Citations
Systems and methods for managing licenses and authorizations in virtual environments.
CN102270290A
Software license generation method and apparatus
CN106529217A