Software activation method, system and device and electronic equipment
By sending information to the dongle to obtain instructions and matching the authorization code and the dongle identity information, the problem of reuse of the authorization code is solved, the reliability of the authorization code is improved, and the legal activation of the protected software is ensured.
Patent Information
- Application Number
- CN202411822568.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the authorization code is not reliable, and users can use the same authorization code to activate the protected software in different devices, resulting in the authorization code activated by the software being unreliable.
By sending information acquisition instructions to the connected dongle, the dongle information, including authorization information and identity information, is obtained. If the entered authorization code matches the dongle identity information and there is no authorization value in the authorization information, the activation is successful and the authorization information is updated.
Ensure the validity of the authorization code, prevent the reuse of the authorization code, and improve the reliability of the authorization code, so that users must use different authorization codes to activate the protected software again.
Smart Images

Figure CN119622673A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software protection, and in particular to a method, system, device and electronic device for activating software. Background Art
[0002] The authorization code is a code used to activate protected software. The authorization code is usually provided by the software developer, and the user is required to enter the authorization code when installing or using the product. The protected software can only be activated and run normally when the authorization code is verified to be correct by the protected software.
[0003] However, there is currently a problem of repeated use of a single authorization code. For example, a user can use the same authorization code to activate protected software on different devices without purchasing multiple authorization codes, resulting in low reliability of the current authorization codes used to activate software.
[0004] Therefore, how to improve the reliability of the authorization code is an urgent problem to be solved. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a software activation method, system, device and electronic device to improve the reliability of the authorization code. The specific technical solution is as follows:
[0006] The embodiment of the present application first provides a method for activating software, which is applied to the protected software side. The method includes:
[0007] Sending an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used during the historical activation;
[0008] Determine whether activation is required based on the obtained dongle information sent by the currently connected dongle;
[0009] If it is determined that activation is currently required, the authorization code entered when activating the protected software is currently obtained as the authorization code to be processed; wherein one authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values;
[0010] If the identity information included in the pending authorization code is consistent with the identity information of the currently connected encryption dongle, and the authorization value included in the pending authorization code does not exist in the obtained authorization information, it is determined that the protected software is successfully activated, and the authorization value included in the pending authorization code is added to the obtained authorization information to obtain new authorization information, and the new authorization information is sent to the currently connected encryption dongle, so that the currently connected encryption dongle stores the new authorization information;
[0011] If the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle, or the obtained authorization information contains the authorization value included in the pending authorization code, it is determined that the activation of the protected software has failed.
[0012] Optionally, an authorization code further includes restrictions on the use of the protected software; the authorization information further includes current restrictions;
[0013] The step of adding the authorization value contained in the authorization code to be processed to the obtained authorization information to obtain new authorization information includes:
[0014] The authorization value included in the pending authorization code is added to the obtained authorization information, and the restriction condition included in the pending authorization code is used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
[0015] Optionally, the method further comprises:
[0016] If it is determined that activation is not currently required, the current restriction condition is updated based on the usage of the protected software to obtain an updated restriction condition;
[0017] The obtained authorization information is updated according to the updated restriction condition to obtain new authorization information, and the new authorization information is sent to the currently connected dongle so that the currently connected dongle records the new authorization information.
[0018] Optionally, the authorization information also includes identity information in the authorization code used during historical activation;
[0019] The determining whether activation is required currently based on the acquired dongle information sent by the currently connected dongle includes:
[0020] When the obtained dongle information sent by the currently connected dongle meets at least one of the following conditions, it is determined that activation is currently required; otherwise, it is determined that activation is currently not required:
[0021] The part of the obtained dongle information that represents the authorization information is empty;
[0022] The identity information contained in the authorization information in the obtained dongle information is inconsistent with the identity information of the currently connected dongle;
[0023] The current restriction in the obtained dongle information indicates that the use is currently not allowed.
[0024] Optionally, when the part representing the authorization information in the dongle information is not empty, the dongle information further includes a random number, and reply data obtained by calculating the random number and the included authorization information based on a preset algorithm;
[0025] Before determining whether activation is currently required based on the acquired dongle information sent by the currently connected dongle, the method further includes:
[0026] Calculate the random number and authorization information in the acquired dongle information based on the preset algorithm to obtain the data to be verified;
[0027] The determining whether activation is required currently based on the acquired dongle information sent by the currently connected dongle includes:
[0028] In the case that the verification data is consistent with the sign-back data in the acquired dongle information, it is determined whether activation is currently required based on the acquired dongle information sent by the currently connected dongle.
[0029] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0030] The present application also provides a method for activating software, which is applied to a dongle, and the method includes:
[0031] When receiving an information acquisition instruction from the protected software side, the dongle information is sent to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information; and in the case of determining that activation is currently required, if it is determined that the identity information contained in the currently input pending authorization code is consistent with the identity information of the dongle, and the authorization value contained in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is successfully activated; if it is determined that the identity information contained in the currently input pending authorization code is inconsistent with the identity information of the dongle, or the authorization value contained in the pending authorization code exists in the obtained dongle information, it is determined that the activation of the protected software has failed; wherein, the dongle information sent by a dongle contains the current authorization information and the identity information of the dongle itself; the authorization information contains the authorization value in the authorization code used during the historical activation;
[0032] Receive and store new authorization information sent by the protected software side; wherein the new authorization information is obtained by adding the authorization value included in the pending authorization code to the obtained authorization information after the protected software side determines that the activation is successful.
[0033] Optionally, an authorization code also includes restrictions when using the protected software; the authorization information also includes current restrictions; the new authorization information is: after the protected software side determines that the protected software has been successfully activated, the authorization value contained in the pending authorization code is added to the obtained authorization information, and the restrictions contained in the pending authorization code are used as the current restrictions to update the obtained authorization information.
[0034] Optionally, when receiving the information acquisition instruction from the protected software side, sending the dongle information to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information, including:
[0035] When receiving the information acquisition instruction from the protected software side, if the part representing the authorization information in the dongle information is not empty, the random number generated by the dongle and the stored authorization information are calculated based on a preset algorithm to obtain the signature data;
[0036] Send the protected software side the dongle information including the generated random number, the stored authorization information, the obtained sign-back data and the identity information of the dongle itself, so that the protected software side calculates the random number and authorization information in the obtained dongle information based on the preset algorithm to obtain the data to be verified; and when it is determined that the verification data is consistent with the sign-back data in the obtained dongle information, determine whether activation is currently required based on the received dongle information.
[0037] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0038] The embodiment of the present application also provides a software activation system, the system comprising: a protected software side and a dongle; wherein:
[0039] The protected software side is used to execute any of the above-mentioned software activation methods applied to the protected software side;
[0040] The dongle is used to execute any of the above-mentioned software activation methods applied to the protected software side.
[0041] Optionally, the storage medium of the dongle is a flash memory array.
[0042] Optionally, data is transmitted between the protected software side and the dongle based on a private protocol.
[0043] The embodiment of the present application further provides a software activation device, which is applied to the protected software side, and the device includes:
[0044] The information acquisition instruction sending module is used to send an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used during the historical activation;
[0045] An activation determination module, used to determine whether activation is currently required based on the acquired dongle information sent by the currently connected dongle;
[0046] The authorization code acquisition module is used to obtain the authorization code input when activating the protected software as the authorization code to be processed if it is determined that activation is currently required; wherein an authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values;
[0047] An activation judgment module is used to determine that the protected software has been successfully activated if the identity information contained in the pending authorization code is consistent with the identity information of the currently connected encryption dongle, and the authorization value contained in the pending authorization code does not exist in the obtained authorization information, add the authorization value contained in the pending authorization code to the obtained authorization information to obtain new authorization information, and send the new authorization information to the currently connected encryption dongle so that the currently connected encryption dongle stores the new authorization information; if the identity information contained in the pending authorization code is inconsistent with the identity information of the currently connected encryption dongle, or the authorization value contained in the pending authorization code exists in the obtained authorization information, then it is determined that the protected software has failed to be activated.
[0048] The present application also provides a software activation device, which is applied to a dongle, and the device includes:
[0049] The dongle information sending module is used to send the dongle information to the protected software side when receiving the information acquisition instruction from the protected software side, so that the protected software side determines whether it needs to be activated currently based on the received dongle information; and in the case of determining that it needs to be activated currently, if it is determined that the identity information contained in the pending authorization code currently input is consistent with the identity information of the dongle, and the authorization value contained in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is activated successfully; if it is determined that the identity information contained in the pending authorization code currently input is inconsistent with the identity information of the dongle, or the authorization value contained in the pending authorization code exists in the obtained dongle information, it is determined that the activation of the protected software fails; wherein, the dongle information sent by a dongle contains the current authorization information and the identity information of the dongle itself; the authorization information contains the authorization value in the authorization code used in the historical activation;
[0050] The authorization information receiving module is used to receive and store new authorization information sent by the protected software side; wherein the new authorization information is obtained by the protected software side adding the authorization value contained in the pending authorization code to the obtained authorization information after determining that the activation is successful.
[0051] The present application also provides an electronic device, including:
[0052] Memory, used to store computer programs;
[0053] The processor is used to implement any of the above-mentioned software activation methods when executing the program stored in the memory.
[0054] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the software activation methods described above is implemented.
[0055] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the software activation methods described above.
[0056] Beneficial effects of the embodiments of the present application:
[0057] In this solution, the authorization code contains the identity information and authorization value of the matching dongle. When the identity information of the dongle in the currently input authorization code is inconsistent with the identity information of the connected dongle, it is determined that the activation of the protected software has failed, which can ensure the validity of the authorization code. Furthermore, since different authorization codes matching the same dongle contain different authorization values, and when the authorization value contained in the pending authorization code exists in the obtained authorization information, it is determined that the activation of the protected software has failed, which requires the user to use a different authorization code to activate the protected software again. Therefore, this solution can solve the problem of repeated use of a single authorization code, thereby improving the reliability of the authorization code.
[0058] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0060] Figure 1 An interactive schematic diagram of the activation system of the software provided in the embodiment of the present application;
[0061] Figure 2 Another interactive schematic diagram of the software activation system provided in the embodiment of the present application;
[0062] Figure 3 A first flow chart of the software activation method provided in the embodiment of the present application;
[0063] Figure 4 A second flow chart of the software activation method provided in the embodiment of the present application;
[0064] Figure 5 A third flow chart of the software activation method provided in the embodiment of the present application;
[0065] Figure 6 A fourth flow chart of the software activation method provided in the embodiment of the present application;
[0066] Figure 7 A schematic diagram of the first structure of the software activation device provided in the embodiment of the present application;
[0067] Figure 8 A second structural diagram of the software activation device provided in the embodiment of the present application;
[0068] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0070] In order to improve the reliability of the authorization code, the embodiments of the present application provide a method, system, device and electronic device for activating software.
[0071] The embodiments of the present application provide activation methods for the software on the protected software side and the dongle, respectively. The protected software side may be an electronic device for running the protected software, and the electronic device may be a computer, a server, etc. In one case, the dongle may be in the form of a hard disk, and the hard disk-shaped dongle may be connected to the protected software side via a SATA (Serial Advanced Technology Attachment) interface, and in this case, the hard disk-shaped dongle and the protected software side may be considered to belong to the same electronic device.
[0072] For ease of understanding, the following first introduces the software activation system provided in the embodiment of the present application.
[0073] like Figure 1 As shown, the software activation system provided in the embodiment of the present application may include: a protected software side 10 and a dongle 20.
[0074] A dongle, also known as a password dongle, is an account and password management tool. The protected software can only be used normally if the protected software side is connected to a matching dongle. The protected software side can be installed with a dongle driver, which contains an API (Application Programming Interface) interface for obtaining data stored in the dongle.
[0075] The dongle 20 may be in the form of a USB flash drive. The dongle 20 in the form of a USB flash drive generally consists of a controller and an EEPROM (Electrically-Erasable Programmable Read-Only Memory). The dongle 20 in the form of a USB flash drive may be connected to the protected software side 10 via a USB (Universal Serial Bus) interface.
[0076] In one implementation of the present application, Figure 2 As shown, the storage medium of the dongle 20 can be a flash memory array. Compared with EEPROM, the data stored in the flash memory array is more difficult to be cloned, which can further improve the security of the stored data. Furthermore, the dongle 20 of the present application can also be in the form of a hard disk based on a flash memory array. Compared with a USB flash drive, the data stored in the hard disk has stronger security, that is, it is more difficult to be cloned. The hard disk-shaped dongle 20 (referred to as the hard disk dongle) can include a controller and a flash memory array, wherein the controller can be used to interact with the protected software side 10 for data, and to read and write data to the flash memory array. The hard disk-shaped dongle 20 can be connected to the protected software side 10 via a SATA interface.
[0077] Since the general open source API interface is usually used to transmit data with the dongle 20, it is easy for the user to analyze the driver of the dongle 20, crack the interaction mode between it and the protected software side 10, and thus write a cracking program, which contains the parameters and return values of all the API interfaces in the driver. Then the user can directly use the cracking program to send the correct parameters and return values to the protected software side 10 without using the matching dongle 20 to activate the protected software, thereby achieving the purpose of cracking the protected software. In order to solve this problem, in this embodiment, data can be transmitted between the protected software side 10 and the dongle 20 based on a private protocol. The private protocol is a self-defined, non-public protocol, that is, the protected software side 10 and the dongle 20 transmit and analyze data based on specific rules. In this way, the API interface in the driver used in this embodiment can also be developed separately based on the private protocol, and the protected software side 10 requests data from the dongle 20 through private instructions based on the private protocol, which makes it difficult for the user to understand the interaction mode between the dongle 20 and the protected software side 10, which increases the difficulty of cracking the protected software and improves the reliability of the dongle 20.
[0078] like Figure 1 As shown, the interaction process between the protected software side 10 and the dongle 20 may include the following steps:
[0079] S101, the protected software side 10 sends an information acquisition instruction to the currently connected dongle 20;
[0080] This step may be performed each time the protected software is run, for example, when a running instruction for the protected software is received. The running instruction may be issued by a user of the protected software side 10 through any human-computer interaction method.
[0081] In this embodiment, the protected software side 10 may perform a process of determining whether activation is required each time the protected software is run, that is, perform steps S101 and S103.
[0082] It is understandable that the running of the protected software mentioned in this embodiment does not mean that the user has used the functions of the protected software. For example, if the protected software is software for sending emails, the protected software can display the interactive interface of the software when it is running. When the user uses the email sending function in the protected software, it means that the user has used the functions of the protected software. If the protected software is not activated, the protected software can run, but its functions are prohibited from being used.
[0083] In this embodiment, if the dongle 20 is in the form of a hard disk, before this step, the protected software side 10 can first send a detection message to the hard disk connected to the electronic device based on the above-mentioned private protocol. Afterwards, if the protected software side 10 can receive a response message fed back by the hard disk, and the response message complies with the provisions of the private protocol, it indicates that the protected software side 10 is currently connected to a dongle, so the subsequent step of sending an information acquisition instruction to the currently connected dongle can be executed. Otherwise, it indicates that the protected software side 10 is not currently connected to a dongle, and at this time, the protected software side 10 can refuse the use of the protected software.
[0084] S102, when receiving the information acquisition instruction of the protected software side 10, the encryption dongle 20 sends the encryption dongle information to the protected software side 10;
[0085] The dongle information includes the current authorization information and the identity information of the dongle 20 itself; the authorization information includes the authorization value in the authorization code used in the historical activation.
[0086] The identity information of each dongle itself can be the identification information set when the dongle is produced, and can also be called a unique code, which can be a string of characters used to uniquely identify the dongle, that is, the identity information of different dongles is different. The dongle information also includes authorization information, and the authorization information includes the authorization value in the authorization code used during historical activation. That is to say, when the protected software is historically activated, the dongle 20 can be connected to the protected software side 10. When the dongle 20 is connected, the user can enter the authorization code to activate the protected software. The authorization code includes the authorization value. After the protected software is activated, the protected software side 10 can update the authorization information with the authorization value included in the authorization code, and send the new authorization information to the connected dongle 20, so that the dongle 20 stores the new authorization information. The current authorization information sent by the dongle 20 is the latest authorization information stored by the dongle 20.
[0087] S103, the protected software side 10 determines whether activation is currently required based on the acquired dongle information sent by the currently connected dongle 20;
[0088] For example, the protected software side 10 can determine that activation is currently required when the part of the dongle information sent by the currently connected dongle 20 indicating the authorization information is empty. As described above, the protected software needs to be connected to the dongle 20 when activated, and after the protected software is activated, the dongle 20 will store the authorization value in the currently used authorization code. If the part of the information in the dongle information obtained by the protected software side 10 is empty, it indicates that the protected software has not been activated, and it can be determined that the protected software currently needs to be activated.
[0089] The method for determining whether activation is required may not be limited to this, and other specific methods will be introduced later.
[0090] S104, if it is determined that activation is currently required, obtaining the authorization code input when activating the protected software currently as the authorization code to be processed; wherein one authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values;
[0091] When it is determined that activation is currently required, the protected software side 10 can display prompt information for prompting the user to enter the authorization code in the interactive interface. For example, the protected software side 10 can pop up an information prompt window, which can prompt the user through text that the protected software currently needs to be activated, and the information prompt window can also include an input box for obtaining the authorization code entered by the user.
[0092] The authorization code may be preset by the developer of the protected software for the matching dongle, and the authorization code may include the identity information and authorization value of the matching dongle; and different authorization codes matching the same dongle may include different authorization values.
[0093] S105, if the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle 20, or the authorization value included in the pending authorization code exists in the obtained authorization information, it is determined that the activation of the protected software has failed; if the identity information included in the pending authorization code is consistent with the identity information of the currently connected dongle 20, and the authorization value included in the pending authorization code does not exist in the obtained authorization information, it is determined that the protected software has been successfully activated, the authorization value included in the pending authorization code is added to the obtained authorization information, new authorization information is obtained, and step S106 is executed;
[0094] S106, sending new authorization information to the currently connected dongle 20;
[0095] After the protected software side 10 obtains the pending authorization code and the identity information sent by the currently connected dongle 20, it can compare whether the identity information in the pending authorization code is consistent with the identity information of the currently connected dongle 20; if they are consistent, it can continue to compare the authorization value contained in the authorization information sent by the dongle 20 to see whether there is an authorization value consistent with the authorization value contained in the pending authorization code. If not, it is determined that the protected software has been successfully activated, and then the authorization value contained in the pending authorization code can be added to the authorization information sent by the currently connected dongle 20 to obtain new authorization information, and the new authorization information is sent to the currently connected dongle 20 so that the currently connected dongle 20 can store the new authorization information.
[0096] In this embodiment, when the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle 20, it is determined that the activation of the protected software has failed. It is understandable that if the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle 20, it indicates that the pending authorization code may be a forged authorization code, or an authorization code set for other dongles that are not connected to the protected software side 10. In this case, determining that the activation of the protected software has failed can avoid activating the protected software with an erroneous authorization code, thereby ensuring the validity of the authorization code.
[0097] Since each time the protected software is successfully activated, the dongle 20 will store the authorization value contained in the currently used authorization code, and the authorization values contained in different authorization codes matching the dongle 20 are different, in this way, when the authorization information obtained by the protected software side 10 from the dongle 20 contains the authorization value contained in the pending authorization code used during the current activation, it indicates that the pending authorization code is a secondary authorization code. At this time, it is determined that the activation of the protected software has failed, which can avoid using a single authorization code to activate the protected software multiple times.
[0098] S107 , the dongle 20 receives and stores the new authorization information sent by the protected software side 10 .
[0099] The dongle 20 can store the received new authorization information in the built-in storage medium. After storing the new authorization information, the dongle 20 can delete other authorization information stored in history to save storage space. Of course, other authorization information may not be deleted, but the authorization information sent by the dongle 20 to the protected software side 10 each time needs to be the latest stored authorization information.
[0100] In this embodiment, the authorization code includes the identity information and authorization value of the matching dongle. When the identity information of the dongle in the currently input authorization code is inconsistent with the identity information of the connected dongle, it is determined that the activation of the protected software has failed, which can ensure the validity of the authorization code. Furthermore, since the authorization values included in different authorization codes matching the same dongle are different, and when the authorization value included in the pending authorization code exists in the obtained authorization information, it is determined that the activation of the protected software has failed, which requires the user to use a different authorization code to activate the protected software again. Therefore, this solution can solve the problem of repeated use of a single authorization code, thereby improving the reliability of the authorization code.
[0101] In an embodiment of the present application, an authorization code also includes restrictions on the use of protected software; the authorization information also includes current restrictions; the authorization value included in the pending authorization code is added to the obtained authorization information to obtain new authorization information, including:
[0102] The authorization value included in the pending authorization code is added to the obtained authorization information, and the restriction condition included in the pending authorization code is used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
[0103] The restriction condition may be: the remaining number of times the protected software is used, the number of authorized days, or the remaining usage time, etc. After the protected software is successfully activated using the pending authorization code, the restriction condition contained in the pending authorization code may be used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
[0104] In addition, after successful activation, or when it is determined that activation is not currently required, the protected software side 10 may also update the current restriction conditions based on the usage of the protected software to obtain updated restriction conditions.
[0105] For example, if the protected software is software for sending emails, and the restriction condition indicates the remaining number of times the protected software can be used, and the user has used the protected software to send emails n times, then the remaining number of times indicated by the current restriction condition can be subtracted from n to obtain an updated restriction condition. For another example, if the restriction condition indicates the remaining usage time of the protected software, then after each use of the specified time, the remaining usage time indicated by the current restriction condition can be subtracted from the specified time to obtain an updated restriction condition. For example, the specified time can be one minute, and thus the current restriction condition can be updated every time the protected software is used for one minute.
[0106] Furthermore, after the restriction condition is updated, the obtained authorization information can be updated according to the updated restriction condition to obtain new authorization information, and the new authorization information is sent to the currently connected dongle 20 so that the currently connected dongle 20 records the new authorization information.
[0107] In addition, if the restriction condition indicates that the use is not allowed at present, the protected software side 10 may prohibit the user from continuing to use the function of the protected software and display corresponding prompt information to remind the user that the use is not allowed at present, or may directly remind the user that a new authorization code needs to be entered. In other words, the protected software side 10 may also determine whether activation is currently required based on the updated restriction condition after each update of the restriction condition, and if the updated restriction condition indicates that the use is not allowed at present, it is determined that activation is currently required.
[0108] If the restriction indicates that the current use is not allowed, it may mean that the remaining number of uses indicated by the restriction is 0, or the remaining usage duration indicated by the restriction is 0; or the number of days between the current date and the activation date exceeds the authorized number of days indicated by the restriction. When the restriction is the authorized number of days, the activation date may be recorded by the protected software side 10, or the activation date may be stored by the dongle 20. For example, when the dongle 20 stores the authorization information, the activation date may be added to the restriction part of the authorization information so that the dongle 20 can store the activation date.
[0109] Since the authorization information also includes the current restriction conditions, when the user needs to use the protected software again, the protected software side 10 can obtain the current restriction conditions from the dongle 20, and then determine whether activation is currently required. For example, if the remaining number of uses indicated by the current restriction conditions is 0, or the remaining usage time indicated by the current restriction conditions is 0, it can be determined that the protected software currently needs to be activated.
[0110] In this embodiment, the problem of repeated use of a single authorization code can be solved, and the reliability of the authorization code is improved. Furthermore, the authorization code also includes restrictions when using the protected software; the authorization information also includes current restrictions; the authorization value contained in the authorization code to be processed is added to the obtained authorization information, and the restrictions contained in the authorization code to be processed by the workstation are used as the current restrictions to update the obtained authorization information, and obtain new authorization information, so that the protected software can obtain the current restrictions from the dongle, and then determine whether it needs to be activated at present. It can be seen that through this solution, restrictions can be set for the protected software through the authorization code, avoiding the problem of permanent activation after one-time use of the authorization code, and further improving the reliability of the authorization code. And the authorization code contains an authorization value, which can avoid users from using repeated authorization codes when re-authorizing the protected software, making the process of secondary authorization of the protected software more reliable.
[0111] In one embodiment of the present application, the authorization information also includes identity information in the authorization code used during historical activation;
[0112] The above-mentioned determination of whether activation is currently required based on the dongle information sent by the currently connected dongle 20 includes:
[0113] When the obtained dongle information sent by the currently connected dongle 20 satisfies at least one of the following conditions, it is determined that activation is currently required; otherwise, it is determined that activation is currently not required:
[0114] The first condition is that the part of the obtained dongle information that represents the authorization information is empty;
[0115] The second condition is that the identity information contained in the authorization information in the obtained dongle information is inconsistent with the identity information of the currently connected dongle;
[0116] The third condition is that the current restriction in the obtained dongle information indicates that it is not currently allowed to be used.
[0117] In this embodiment, the protected software side 10 can first obtain the dongle information sent by the currently connected dongle 20, and determine whether the part representing the authorization information in the obtained dongle information is empty. If it is empty, it is determined that activation is currently required; if it is not empty, it is determined whether the identity information contained in the authorization information sent by the currently connected dongle 20 is consistent with the identity information of the currently connected dongle 20.
[0118] As mentioned above, the identity information included in the authorization information is the identity information in the authorization code used during historical activation. If the identity information in the authorization information stored in the dongle 20 is inconsistent with the actual identity information of the dongle 20, it indicates that the authorization information stored in the dongle 20 may be forged information. At this time, it can be determined that the protected software is not allowed to be used, that is, it is determined that the protected software currently needs to be activated.
[0119] If the identity information in the authorization information stored in the dongle 20 is consistent with the actual identity information of the dongle 20, it can be determined whether the current restriction condition sent by the currently connected dongle 20 indicates that the use is not currently allowed. If it indicates that the use is not currently allowed, it is determined that the protected software currently needs to be activated; otherwise, it is determined that the use is currently allowed and no activation is required.
[0120] The protected software side 10 only needs to determine that activation is currently required when it is determined that at least one of the above conditions is met. The specific determination sequence may not be limited to the above process.
[0121] In this embodiment, the problem of repeated use of a single authorization code can be solved, and the reliability of the authorization code is improved. Furthermore, by setting restrictions for the protected software, the problem of permanent activation of the authorization code after one use is avoided; by determining whether the identity information contained in the authorization information sent by the currently connected dongle is consistent with the identity information of the currently connected dongle, it is possible to prevent the user from using the protected software using forged dongle information. Therefore, the reliability of the authorization code is further improved through this solution.
[0122] In an embodiment of the present application, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0123] That is to say, when generating the authorization code, the information to be carried can be encrypted, and the encrypted result can be used as the authorization code. The encryption algorithm can be any data encryption algorithm, such as AES (Advanced Encryption Standard) encryption, DES (Data Encryption Standard) encryption, etc.
[0124] After the protected software side 10 obtains the authorization code to be processed, the authorization code can be decrypted using the decryption algorithm corresponding to the encryption algorithm used during encryption to obtain the information carried in the authorization code. For example, if the authorization code needs to include the identity information, restrictions and authorization value of the matching dongle 20, the identity information, restrictions and authorization value of the matching dongle 20 can be spliced first, and then the spliced data can be encrypted to obtain the authorization code. Then, after obtaining the authorization code, the protected software side 10 can decrypt the authorization code to obtain the identity information, restrictions and authorization value contained therein.
[0125] Similarly, if the authorization information includes: the identity information in the authorization code used in the historical activation, the current restriction conditions, and the authorization value in the authorization code used in the historical activation, then the protected software side 10 can, after successful activation, concatenate the identity information, restriction conditions and authorization value in the currently used authorization code and the authorization value in the historically used authorization code, and encrypt the concatenated data to obtain the authorization information, which can also be called ciphertext data at this time; thereafter, the protected software side 10 obtains the authorization information from the encryption dog 20, and then decrypts the obtained authorization information to obtain the identity information in the authorization code used in the historical activation, the current restriction conditions, and the authorization value in the authorization code used in the historical activation.
[0126] In this embodiment, the problem of repeated use of a single authorization code can be solved, and the reliability of the authorization code is improved. Furthermore, the authorization code is obtained by encrypting the data contained therein; the authorization information is obtained by encrypting the data contained therein, which can further enhance the security of the authorization code and the authorization information.
[0127] In an embodiment of the present application, when the part representing the authorization information in the dongle information is not empty, when the dongle 20 receives the information acquisition instruction of the protected software side 10, it sends the dongle information to the protected software side 10, which may specifically include:
[0128] Step A1, when receiving the information acquisition instruction from the protected software side 10, if the part representing the authorization information in the dongle information is not empty, the random number generated by the dongle 20 and the stored authorization information are calculated based on a preset algorithm to obtain the signature data;
[0129] The preset algorithm may be any signature algorithm, such as a hash signature, a DSA (Digital Signature Algorithm) signature, etc. The random number may be generated by the dongle 20 when receiving an information acquisition instruction from the protected software side 10 .
[0130] Step A2, sending the dongle information including the generated random number, the stored authorization information, the obtained return data and the identity information of the dongle 20 itself to the protected software side 10.
[0131] Accordingly, before the protected software side 10 determines whether activation is currently required based on the dongle information sent by the currently connected dongle 20, the protected software side 10 is further used to:
[0132] Based on the above preset algorithm, the random number and authorization information in the obtained dongle information are calculated to obtain the data to be verified;
[0133] Then, the protected software side 10 can compare the obtained data to be verified with the received reply data to see if they are consistent. If they are inconsistent, it indicates that the received authorization information may have been tampered with. At this time, the subsequent steps can be stopped and the use of the protected software can be prohibited.
[0134] In this case, the protected software side 10 determines whether activation is currently required based on the dongle information sent by the currently connected dongle 20, which may include:
[0135] When the verification data is consistent with the signature data in the obtained dongle information, it indicates that the received authorization information has not been tampered with and has a certain degree of security. Then, the step of determining whether activation is currently required can be executed based on the dongle information sent by the currently connected dongle 20.
[0136] In this embodiment, the problem of repeated use of a single authorization code can be solved, and the reliability of the authorization code is improved. Furthermore, since the reply data in this solution is calculated based on the authorization information and the random number, even if the user forges a driver to intercept the communication between the protected software and the dongle, if the user does not know that the reply data of this solution needs to be generated using a random number, he or she will not be able to use the forged driver to crack the protected software. Therefore, this solution can further improve the security of the protected software.
[0137] To facilitate understanding, the embodiments of the present application are exemplarily introduced below in conjunction with the accompanying drawings and the specific implementation process.
[0138] like Figure 3 As shown, when using the protected software, the protected software side can perform the following steps:
[0139] S301, use private instructions;
[0140] The protected software side can use private instructions based on a private protocol to communicate with the dongle. When there is no need to communicate with the dongle, the protected software side can disable the private instructions.
[0141] S302, determine whether the command fails; that is, determine whether the command using the private instruction fails; if so, execute S303 to disable the private instruction, and execute S304 to stop using, that is, deactivate the protected software; if not, execute S305 to obtain a unique code;
[0142] S306, determine whether the command fails; that is, determine whether the acquisition of the unique code fails; if so, execute S303 to disable private instructions; if not, execute S307 to obtain the ciphertext, that is, the encrypted authorization information; S308, obtain the return signature, that is, the above-mentioned return signature data.
[0143] The protected software can use private instructions to obtain the unique code (i.e. identity information) of the dongle, as well as the ciphertext data (i.e. encrypted authorization information) and the signature data. If the command fails during this process, the private instructions can be disabled and the protected software can be deactivated.
[0144] After obtaining the unique code, ciphertext data and signature data, S309 can be executed to determine whether the ciphertext is empty, that is, to determine whether the part representing the authorization information in the dongle information sent by the dongle is empty. If it is not empty, S310 is executed, otherwise S303 is executed.
[0145] S310, determine whether the return sign is valid, that is, determine whether the verification data is consistent with the return sign data in the obtained dongle information; S311, determine whether the ciphertext is valid, that is, determine whether the ciphertext data conforms to the format specified by the private instruction. If the above data are all valid, that is, the return sign is valid and the ciphertext is valid, the protected software side can execute S312, otherwise, execute S303.
[0146] S312, parse the ciphertext to obtain the unique code in the ciphertext; S313, determine whether the unique code is valid, that is, determine whether the identity information contained in the authorization information sent by the dongle is consistent with the identity information of the currently connected dongle; if so, execute S314 to determine whether the usage conditions are valid, that is, determine whether the restriction conditions contained in the authorization information indicate that the use is not currently allowed.
[0147] If the use condition is valid, then S315 is executed to determine that the protected software can continue to be used; otherwise, S303 is executed to disable the private instructions; and S304 is executed to stop using.
[0148] In another aspect of the embodiment of the present application, Figure 4 When using the authorization code to activate the protected software, the protected software can perform the following steps:
[0149] S401, obtaining an authorization code, that is, the authorization code currently entered for activation;
[0150] S402, parse the authorization code to obtain the unique code (i.e., identity information), restriction conditions, and authorization value of the dongle contained in the authorization code. Then, execute S403 to determine whether the authorization code matches the unique code, i.e., determine whether the identity information contained in the authorization code to be processed is consistent with the identity information of the currently connected dongle; if not, execute S404 to prohibit use, i.e., determine that the activation failed and prohibit the use of the protected software.
[0151] If they are consistent, execute S405 to obtain the historical authorization value, that is, the authorization value used in the historical activation; if the historical authorization value exists in the authorization value in the currently input authorization code, it indicates that the authorization code has been used and the activation is determined to have failed; if the historical authorization value does not exist in the authorization value in the currently input authorization code, execute S406 to generate ciphertext, that is, the encrypted authorization information, and the authorization information includes the unique code, authorization value and historical authorization value in the authorization code; S407, use private instructions to execute S408 to write the ciphertext, that is, write the generated ciphertext into the encryption dog.
[0152] After that, the dongle can generate a random number and generate a sign-back data based on the new ciphertext data and the random number. The protected software side can then execute S409 to obtain the sign-back, and obtain the sign-back data generated by the dongle through private instructions; S410 to disable private instructions; S411 to determine whether the sign-back is valid, that is, to determine whether the verification data is consistent with the sign-back data in the obtained dongle information. If so, execute S412 to determine whether to allow the continuation, that is, the protected software does not need to be activated; if not, execute S404 to prohibit use, which also indicates that the protected software needs to be activated.
[0153] The present application embodiment also provides a software activation method, which is applied to the protected software side, such as Figure 5 As shown, the method comprises the following steps:
[0154] S501, sending an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes current authorization information and identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used in the historical activation;
[0155] S502, determining whether activation is currently required based on the acquired dongle information sent by the currently connected dongle;
[0156] S503, if it is determined that activation is currently required, obtaining the authorization code input when activating the protected software currently as the authorization code to be processed; wherein one authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values;
[0157] S504, if the identity information included in the pending authorization code is consistent with the identity information of the currently connected dongle, and the authorization value included in the pending authorization code does not exist in the obtained authorization information, it is determined that the protected software is activated successfully, the authorization value included in the pending authorization code is added to the obtained authorization information to obtain new authorization information, and the new authorization information is sent to the currently connected dongle, so that the currently connected dongle stores the new authorization information;
[0158] S505: If the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle, or the obtained authorization information contains the authorization value included in the pending authorization code, it is determined that the activation of the protected software has failed.
[0159] The specific execution process of this embodiment can refer to the above-mentioned software activation system embodiment, which will not be repeated here.
[0160] Optionally, an authorization code also includes restrictions on the use of the protected software; the authorization information also includes the current restrictions;
[0161] Add the authorization value contained in the authorization code to be processed to the obtained authorization information to obtain new authorization information, including:
[0162] The authorization value included in the pending authorization code is added to the obtained authorization information, and the restriction condition included in the pending authorization code is used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
[0163] Optionally, the method further comprises:
[0164] If it is determined that activation is not currently required, the current restriction condition is updated based on the usage of the protected software to obtain an updated restriction condition;
[0165] The obtained authorization information is updated according to the updated restriction condition to obtain new authorization information, and the new authorization information is sent to the currently connected dongle so that the currently connected dongle records the new authorization information.
[0166] Optionally, the authorization information also includes identity information in the authorization code used during historical activation;
[0167] Based on the obtained dongle information sent by the currently connected dongle, determine whether activation is currently required, including:
[0168] When the obtained dongle information sent by the currently connected dongle meets at least one of the following conditions, it is determined that activation is currently required; otherwise, it is determined that activation is currently not required:
[0169] The part of the obtained dongle information that represents the authorization information is empty;
[0170] The identity information contained in the authorization information in the obtained dongle information is inconsistent with the identity information of the currently connected dongle;
[0171] The current restriction in the obtained dongle information indicates that the use is currently not allowed.
[0172] Optionally, when the part representing the authorization information in the dongle information is not empty, the dongle information further includes a random number, and reply data obtained by calculating the random number and the included authorization information based on a preset algorithm;
[0173] Before determining whether activation is currently required based on the acquired dongle information sent by the currently connected dongle, the method further includes:
[0174] Calculate the random number and authorization information in the obtained dongle information based on a preset algorithm to obtain the data to be verified;
[0175] Based on the obtained dongle information sent by the currently connected dongle, determining whether activation is currently required includes:
[0176] When the verification data is consistent with the sign-back data in the acquired dongle information, it is determined whether activation is currently required based on the acquired dongle information sent by the currently connected dongle.
[0177] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0178] The present application also provides a software activation method, which is applied to a dongle, such as Figure 6 As shown, the method comprises the following steps:
[0179] S601, when receiving an information acquisition instruction from the protected software side, sending the dongle information to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information; and in the case of determining that activation is currently required, if it is determined that the identity information included in the pending authorization code currently input is consistent with the identity information of the dongle, and the authorization value included in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is successfully activated; if it is determined that the identity information included in the pending authorization code currently input is inconsistent with the identity information of the dongle, or the authorization value included in the pending authorization code exists in the obtained dongle information, it is determined that the protected software has failed to be activated;
[0180] The dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used during the historical activation;
[0181] S602, receiving and storing new authorization information sent by the protected software side;
[0182] The new authorization information is obtained by adding the authorization value included in the pending authorization code to the obtained authorization information after the protected software side determines that the activation is successful.
[0183] The specific execution process of this embodiment can refer to the above-mentioned software activation system embodiment, which will not be repeated here.
[0184] Optionally, an authorization code also includes restrictions when using the protected software; the authorization information also includes current restrictions; the new authorization information is: after the protected software side determines that the protected software has been successfully activated, the authorization value contained in the pending authorization code is added to the obtained authorization information, and the restrictions contained in the pending authorization code are used as the current restrictions to update the obtained authorization information.
[0185] Optionally, when receiving the information acquisition instruction of the protected software side, sending the dongle information to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information, including:
[0186] When receiving the information acquisition instruction from the protected software side, if the part representing the authorization information in the dongle information is not empty, the random number generated by the dongle and the stored authorization information are calculated based on the preset algorithm to obtain the signature data;
[0187] The protected software side is sent the dongle information including the generated random number, the stored authorization information, the obtained signature data and the identity information of the dongle itself, so that the protected software side calculates the random number and authorization information in the obtained dongle information based on a preset algorithm to obtain the data to be verified; and when it is determined that the verification data is consistent with the signature data in the obtained dongle information, it is determined whether activation is currently required based on the received dongle information.
[0188] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0189] The present application also provides a software activation device, which is applied to the protected software side, such as Figure 7 As shown, the device comprises:
[0190] The information acquisition instruction sending module 701 is used to send an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used in the historical activation;
[0191] An activation determination module 702, configured to determine whether activation is currently required based on the acquired dongle information sent by the currently connected dongle;
[0192] The authorization code acquisition module 703 is used to acquire the authorization code input when activating the protected software as the authorization code to be processed if it is determined that activation is currently required; wherein an authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values;
[0193] The activation judgment module 704 is used to determine that the protected software has been successfully activated if the identity information contained in the pending authorization code is consistent with the identity information of the currently connected encryption dongle, and the authorization value contained in the pending authorization code does not exist in the obtained authorization information, add the authorization value contained in the pending authorization code to the obtained authorization information, obtain new authorization information, and send the new authorization information to the currently connected encryption dongle so that the currently connected encryption dongle stores the new authorization information; if the identity information contained in the pending authorization code is inconsistent with the identity information of the currently connected encryption dongle, or the authorization value contained in the pending authorization code exists in the obtained authorization information, then it is determined that the protected software has failed to be activated.
[0194] Optionally, an authorization code further includes restrictions on the use of the protected software; the authorization information further includes current restrictions;
[0195] The activation determination module 704 is specifically used for:
[0196] The authorization value included in the pending authorization code is added to the obtained authorization information, and the restriction condition included in the pending authorization code is used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
[0197] Optionally, the device further comprises:
[0198] A restriction condition updating module, for updating the current restriction condition based on the usage of the protected software to obtain an updated restriction condition if it is determined that activation is not currently required;
[0199] The authorization information updating module is used to update the obtained authorization information according to the updated restriction conditions, obtain new authorization information, and send the new authorization information to the currently connected encryption dongle so that the currently connected encryption dongle records the new authorization information.
[0200] Optionally, the authorization information also includes identity information in the authorization code used during historical activation;
[0201] Activate the determination module, specifically for:
[0202] When the obtained dongle information sent by the currently connected dongle meets at least one of the following conditions, it is determined that activation is currently required; otherwise, it is determined that activation is currently not required:
[0203] The part of the obtained dongle information that represents the authorization information is empty;
[0204] The identity information contained in the authorization information in the obtained dongle information is inconsistent with the identity information of the currently connected dongle;
[0205] The current restriction in the obtained dongle information indicates that the use is currently not allowed.
[0206] Optionally, when the part of the dongle information representing the authorization information is not empty, the dongle information further includes a random number, and reply data obtained by calculating the random number and the included authorization information based on a preset algorithm;
[0207] The device also includes:
[0208] A verification calculation module, used for calculating the random number and authorization information in the obtained dongle information based on the preset algorithm to obtain data to be verified before the activation determination module 702 determines whether activation is currently required based on the obtained dongle information sent by the currently connected dongle;
[0209] The activation determination module 702 is specifically used for:
[0210] In the case that the verification data is consistent with the sign-back data in the acquired dongle information, it is determined whether activation is currently required based on the acquired dongle information sent by the currently connected dongle.
[0211] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0212] The present application also provides a software activation device, which is applied to a dongle, such as Figure 8 As shown, the device comprises:
[0213] The dongle information sending module 801 is used to send the dongle information to the protected software side when receiving the information acquisition instruction from the protected software side, so that the protected software side determines whether it needs to be activated currently based on the received dongle information; and in the case of determining that it needs to be activated currently, if it is determined that the identity information contained in the currently input pending authorization code is consistent with the identity information of the dongle, and the authorization value contained in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is activated successfully; if it is determined that the identity information contained in the currently input pending authorization code is inconsistent with the identity information of the dongle, or the authorization value contained in the pending authorization code exists in the obtained dongle information, it is determined that the protected software fails to be activated; wherein, the dongle information sent by a dongle contains the current authorization information and the identity information of the dongle itself; the authorization information contains the authorization value in the authorization code used in the historical activation;
[0214] The authorization information receiving module 802 is used to receive and store new authorization information sent by the protected software side; wherein the new authorization information is obtained by the protected software side adding the authorization value contained in the pending authorization code to the obtained authorization information after determining that the activation is successful.
[0215] Optionally, an authorization code also includes restrictions when using the protected software; the authorization information also includes current restrictions; the new authorization information is: after the protected software side determines that the protected software has been successfully activated, the authorization value contained in the pending authorization code is added to the obtained authorization information, and the restrictions contained in the pending authorization code are used as the current restrictions to update the obtained authorization information.
[0216] Optionally, the dongle information sending module 801 includes:
[0217] The back-signing data calculation submodule is used for, when receiving the information acquisition instruction from the protected software side, if the part representing the authorization information in the dongle information is not empty, calculating the back-signing data based on the random number generated by the dongle and the stored authorization information based on a preset algorithm;
[0218] The information sending submodule is used to send the protected software side the dongle information including the generated random number, the stored authorization information, the obtained sign-back data and the identity information of the dongle itself, so that the protected software side calculates the random number and authorization information in the obtained dongle information based on the preset algorithm to obtain the data to be verified; and when it is determined that the verification data is consistent with the sign-back data in the obtained dongle information, determine whether activation is currently required based on the received dongle information.
[0219] Optionally, each authorization code is obtained by encrypting the data contained therein; and / or, the authorization information is obtained by encrypting the data contained therein.
[0220] The present application also provides an electronic device, such as Fig. 9 As shown, including:
[0221] Memory 901, used for storing computer programs;
[0222] The processor 902 is used to implement the steps of any of the above-mentioned software activation methods when executing the program stored in the memory 901.
[0223] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 902, the communication interface, and the memory 901 communicate with each other via the communication bus.
[0224] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0225] The communication interface is used for communication between the above electronic device and other devices.
[0226] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0227] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0228] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the activation method of any of the above software are implemented.
[0229] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the activation method of any software in the above embodiments.
[0230] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0231] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0232] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method, device, and electronic device embodiments, since they are basically similar to the system embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0233] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for activating software, characterized in that: Applied to the protected software side, the method includes: Sending an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used during the historical activation; Determine whether activation is required based on the obtained dongle information sent by the currently connected dongle; If it is determined that activation is currently required, the authorization code entered when activating the protected software is currently obtained as the authorization code to be processed; wherein an authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values; If the identity information included in the pending authorization code is consistent with the identity information of the currently connected encryption dongle, and the authorization value included in the pending authorization code does not exist in the obtained authorization information, it is determined that the protected software is successfully activated, and the authorization value included in the pending authorization code is added to the obtained authorization information to obtain new authorization information, and the new authorization information is sent to the currently connected encryption dongle, so that the currently connected encryption dongle stores the new authorization information; If the identity information included in the pending authorization code is inconsistent with the identity information of the currently connected dongle, or the obtained authorization information contains the authorization value included in the pending authorization code, it is determined that the activation of the protected software has failed.
2. The method according to claim 1, characterized in that An authorization code also includes restrictions on the use of the protected software; the authorization information also includes the current restrictions; The step of adding the authorization value contained in the authorization code to be processed to the obtained authorization information to obtain new authorization information includes: The authorization value included in the pending authorization code is added to the obtained authorization information, and the restriction condition included in the pending authorization code is used as the current restriction condition to update the obtained authorization information to obtain new authorization information.
3. The method according to claim 2, characterized in that The method further comprises: If it is determined that activation is not currently required, the current restriction condition is updated based on the usage of the protected software to obtain an updated restriction condition; The obtained authorization information is updated according to the updated restriction condition to obtain new authorization information, and the new authorization information is sent to the currently connected dongle so that the currently connected dongle records the new authorization information.
4. The method according to claim 2 or 3, characterized in that: The authorization information also includes the identity information in the authorization code used during historical activation; The determining whether activation is required currently based on the acquired dongle information sent by the currently connected dongle includes: When the obtained dongle information sent by the currently connected dongle meets at least one of the following conditions, it is determined that activation is currently required; otherwise, it is determined that activation is currently not required: The part of the obtained dongle information that represents the authorization information is empty; The identity information contained in the authorization information in the obtained dongle information is inconsistent with the identity information of the currently connected dongle; The current restriction in the obtained dongle information indicates that the use is currently not allowed.
5. The method according to any one of claims 1 to 3, characterized in that: In the case where the part representing the authorization information in the dongle information is not empty, the dongle information further includes a random number, and reply data obtained by calculating the random number and the included authorization information based on a preset algorithm; Before determining whether activation is currently required based on the acquired dongle information sent by the currently connected dongle, the method further includes: Calculate the random number and authorization information in the acquired dongle information based on the preset algorithm to obtain the data to be verified; The determining whether activation is required currently based on the acquired dongle information sent by the currently connected dongle includes: In the case that the verification data is consistent with the sign-back data in the acquired dongle information, it is determined whether activation is currently required based on the acquired dongle information sent by the currently connected dongle.
6. The method according to any one of claims 1 to 3, characterized in that: Each authorization code is obtained by encrypting the data contained therein; and / or the authorization information is obtained by encrypting the data contained therein.
7. A method for activating software, characterized in that: Applied to a dongle, the method comprises: When receiving an information acquisition instruction from the protected software side, the dongle information is sent to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information; and in the case of determining that activation is currently required, if it is determined that the identity information contained in the currently input pending authorization code is consistent with the identity information of the dongle, and the authorization value contained in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is successfully activated; if it is determined that the identity information contained in the currently input pending authorization code is inconsistent with the identity information of the dongle, or the authorization value contained in the pending authorization code exists in the obtained dongle information, it is determined that the activation of the protected software has failed; wherein, the dongle information sent by a dongle contains the current authorization information and the identity information of the dongle itself; the authorization information contains the authorization value in the authorization code used during the historical activation; Receive and store new authorization information sent by the protected software side; wherein the new authorization information is obtained by adding the authorization value included in the pending authorization code to the obtained authorization information after the protected software side determines that the activation is successful.
8. The method according to claim 7, characterized in that An authorization code also includes restrictions when using the protected software; the authorization information also includes current restrictions; the new authorization information is obtained by: after the protected software side determines that the protected software has been successfully activated, adding the authorization value contained in the pending authorization code to the obtained authorization information, and using the restrictions contained in the pending authorization code as the current restrictions to update the obtained authorization information.
9. The method according to claim 7 or 8, characterized in that: When receiving the information acquisition instruction of the protected software side, sending the dongle information to the protected software side, so that the protected software side determines whether activation is currently required based on the received dongle information, including: When receiving the information acquisition instruction from the protected software side, if the part representing the authorization information in the dongle information is not empty, the random number generated by the dongle and the stored authorization information are calculated based on a preset algorithm to obtain the signature data; Send the protected software side the dongle information including the generated random number, the stored authorization information, the obtained sign-back data and the identity information of the dongle itself, so that the protected software side calculates the random number and authorization information in the obtained dongle information based on the preset algorithm to obtain the data to be verified; and when it is determined that the verification data is consistent with the sign-back data in the obtained dongle information, determine whether activation is currently required based on the received dongle information.
10. The method according to claim 7 or 8, characterized in that: Each authorization code is obtained by encrypting the data contained therein; and / or the authorization information is obtained by encrypting the data contained therein.
11. A software activation system, characterized in that: The system comprises: a protected software side and a dongle; wherein: The protected software side is used to execute the method according to any one of claims 1 to 6; The dongle is used to execute the method according to any one of claims 7 to 10.
12. The system according to claim 11, characterized in that The storage medium of the dongle is a flash memory array.
13. The system according to claim 11, characterized in that The protected software and the dongle perform data transmission based on a private protocol.
14. A software activation device, characterized in that: Applied to the protected software side, the device comprises: The information acquisition instruction sending module is used to send an information acquisition instruction to the currently connected dongle to instruct the currently connected dongle to send dongle information; wherein the dongle information sent by a dongle includes the current authorization information and the identity information of the dongle itself; the authorization information includes the authorization value in the authorization code used during the historical activation; An activation determination module, used to determine whether activation is currently required based on the acquired dongle information sent by the currently connected dongle; The authorization code acquisition module is used to obtain the authorization code input when activating the protected software as the authorization code to be processed if it is determined that activation is currently required; wherein an authorization code includes the identity information and authorization value of the matching dongle; different authorization codes matching the same dongle include different authorization values; An activation judgment module is used to determine that the protected software has been successfully activated if the identity information contained in the pending authorization code is consistent with the identity information of the currently connected encryption dongle, and the authorization value contained in the pending authorization code does not exist in the obtained authorization information, add the authorization value contained in the pending authorization code to the obtained authorization information to obtain new authorization information, and send the new authorization information to the currently connected encryption dongle so that the currently connected encryption dongle stores the new authorization information; if the identity information contained in the pending authorization code is inconsistent with the identity information of the currently connected encryption dongle, or the authorization value contained in the pending authorization code exists in the obtained authorization information, then it is determined that the protected software has failed to be activated.
15. A software activation device, characterized in that: Applied to a dongle, the device comprises: The dongle information sending module is used to send the dongle information to the protected software side when receiving the information acquisition instruction from the protected software side, so that the protected software side determines whether it needs to be activated currently based on the received dongle information; and in the case of determining that it needs to be activated currently, if it is determined that the identity information contained in the pending authorization code currently input is consistent with the identity information of the dongle, and the authorization value contained in the pending authorization code does not exist in the obtained dongle information, it is determined that the protected software is activated successfully; if it is determined that the identity information contained in the pending authorization code currently input is inconsistent with the identity information of the dongle, or the authorization value contained in the pending authorization code exists in the obtained dongle information, it is determined that the activation of the protected software fails; wherein, the dongle information sent by a dongle contains the current authorization information and the identity information of the dongle itself; the authorization information contains the authorization value in the authorization code used in the historical activation; The authorization information receiving module is used to receive and store new authorization information sent by the protected software side; wherein the new authorization information is obtained by the protected software side adding the authorization value contained in the pending authorization code to the obtained authorization information after determining that the activation is successful.
16. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1-6 or any one of claims 7-10 when executing a program stored in a memory.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 6 or any one of claims 7 to 10 is implemented.
18. A computer program product comprising instructions, characterized in that When the computer program product is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 6 or any one of claims 7 to 10.