Secret key file method and device aiming at software validity period limitation
By using the signature code and time tag of key files in the software, we ensure that the software runs under authorization conditions, solving the problem of bypassing the validity period limit in the existing technology, protecting the rights and interests of software development companies, and ensuring the legality of the software use.
Patent Information
- Application Number
- CN202411327615.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-07
AI Technical Summary
In the prior art, the software validity period limit is easily bypassed, especially when the computer time can be modified or not connected to the Internet, resulting in the unauthorized use of the software and damaging the rights and interests of the software development company.
The key file method is adopted, including feature codes and time tags. The feature codes are used to match computer hardware information. The time tags are used to record real network time to ensure that the software runs under authorized conditions and prevent time from being modified or reinstalled to bypass the validity period limit. .
It effectively prevents the invalidity of the validity period limit caused by the modification of computer time, long-term non-networking or reinstallation, ensures that the software can only be used under authorization conditions, protects the rights and interests of the software developers, and users need to purchase the service period to continue using the software.
Smart Images

Figure CN119272242A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a key file method and device for limiting the validity period of software. Background Art
[0002] After a company develops software, it will generally release it to users for use. In order to increase the protection of software intellectual property rights and prevent others from using it illegally without authorization, a time-based validity limit will be adopted; for example, the software is released to Company A for use for one year, and after one year, the software will automatically become invalid. There are many ways to do this, such as: 1. Release a key file or signature file, write the validity period on the key or signature file, and determine whether the time has expired based on the computer date; 2. The software continuously accesses the network or server time, and writes the validity period time through the signature file to determine whether it has expired; this is used to identify the user's identity and usage time.
[0003] The above-mentioned prior art has the following shortcomings: 1. The computer time can be modified, so the validity period limit is invalid; 2. For some instrument and equipment application software, the computer is not connected to the Internet for a long time, and the access to the network or server time fails. At the same time, the local time information is modified, and the validity period limit is invalid; 3. Some software continuously writes time tags to the internal files of the software during operation. By comparing the time tags before and after, it can be identified that the computer time has been modified. However, this method modifies the computer time and then reinstalls the software, which also invalidates the validity period limit, and the software is illegally used without authorization. Summary of the invention
[0004] Based on this, it is necessary to propose a key file method and device for limiting the validity period of software to address the above problems.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A key file method for limiting the validity period of software, comprising:
[0007] S1, obtain the startup instruction, determine whether there is an authorization mark, if there is no authorization mark, determine whether there is an initial key file and whether the network is connected;
[0008] S2, if there is an initial key file and the network is connected, then write the authorization mark, and write the feature code and time tag to the initial key file, the feature code is used to match the computer hardware information, the time tag includes the real network time, and the initial key file becomes a key file after the feature code is written;
[0009] S3, reading the internal information of the key file, the internal information including a feature code, a time tag and a validity period;
[0010] S4, run the software to determine whether the three conditions of feature code matching computer hardware information, system time being greater than the time tag, and system time being less than the validity period are met at the same time. If not, the software cannot run. If so, run the software and write the time tag to the software from time to time, and make a real-time judgment on the written time tag to confirm whether the above three conditions are met at the same time.
[0011] In one embodiment, the S1 further includes determining whether there is a key file and a feature code if there is an authorization mark, and reading the internal information of the key file if there is the key file and the feature code.
[0012] In one embodiment, the determining whether there is a key file and a feature code further includes the software being unable to run if any one or both of the key file and the feature code are missing.
[0013] In one embodiment, the S1 also includes that the software cannot run without the initial key file.
[0014] In one embodiment, the S1 also includes that if there is no network connection, the software cannot run.
[0015] In one embodiment, S4 further includes running the software if the feature code matches the computer hardware information, the system time is greater than the time tag, and the system time is less than the validity period.
[0016] In one embodiment, the S4 further comprises writing the time stamp from the system time to the software.
[0017] In one embodiment, S3 further includes reading the plurality of feature codes and obtaining the number of the plurality of feature codes as a preset value of the feature code.
[0018] In one embodiment, the S4 further includes obtaining the real-time number of the feature code from time to time and comparing it with the preset value. If the real-time number is greater than the preset number, the software cannot run.
[0019] A key file device for limiting the validity period of software includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the method described in any one of the above embodiments.
[0020] The present invention installs a key file as a must-read file for software startup on the software. Generally, when a user installs the software, that is, when the software is started, the user will receive an initial key file sent by the software developer. The key file includes: a feature code, a time tag, and a validity period. The feature code is used to identify the computer identity, and the time tag is used to mark the use time of the software and prevent the computer time from being modified. The key file without the feature code is the initial key file. At this time, the computer must be connected to the Internet to write an authorization mark to the software, and the feature code (a combination of computer hardware information according to certain rules) and the time tag are written to the initial key file. If the authorization code, the Internet, the feature code, the time tag, and the validity period are not met at the same time, the software cannot be run, thereby avoiding the problem that the computer system time is modified, the computer is not connected to the Internet for a long time, the validity period limit becomes invalid after the software is reinstalled, and preventing unauthorized illegal use. The method can better protect the relevant rights and interests of the software developer or the software owner. If the user wants to continue to use the software, he must purchase the software validity period. At the same time, the validity period protection method enables the software development company to obtain more practical protection of the software development rights and interests in product promotion and market development. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] in:
[0023] Figure 1 It is a flow chart of a key file method for limiting the validity period of software according to the present invention;
[0024] Figure 2 It is a program flowchart of a key file method for limiting the validity period of software described in the present invention. DETAILED DESCRIPTION
[0025] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "connecting" another element, it can be directly on another element, or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "left", "right", "upper end", "lower end", "top" and "bottom" used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0026] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0027] In order to solve the problem that the system time of the computer can be modified, the software can be reinstalled without networking to circumvent the validity period limit, and the software is used illegally without authorization, thereby damaging the rights and interests of the software development company, the following is combined with the attached Figure 1 to Figure 2 A key file method and device for limiting the validity period of software provided by an embodiment of the present invention are described in detail.
[0028] See also Figure 1 and Figure 2 , Figure 1 is a flow chart of a key file method for limiting the validity period of software according to the present invention, Figure 2 The present invention is a flowchart of a key file method for limiting the validity period of software, a key file method for limiting the validity period of software, comprising:
[0029] S1, obtain the startup instruction, determine whether there is an authorization mark, if there is no authorization mark, determine whether there is an initial key file and whether the network is connected;
[0030] S2, if there is an initial key file and the network is connected, then write the authorization mark, and write the feature code and time tag to the initial key file, the feature code is used to match the computer hardware information, the time tag includes the real network time, and the initial key file becomes a key file after the feature code is written;
[0031] S3, reading the internal information of the key file, the internal information including a feature code, a time tag and a validity period;
[0032] S4, run the software to determine whether the three conditions of feature code matching computer hardware information, system time being greater than the time tag, and system time being less than the validity period are met at the same time. If not, the software cannot run. If so, run the software and write the time tag to the software from time to time, and make a real-time judgment on the written time tag to confirm whether the above three conditions are met at the same time.
[0033] Specifically, the authorization mark: the authorization mark is recorded in a configuration file in the software. When the software is started, the authorization mark in the location file will be read. Newly installed software does not have an authorization mark. If there is no authorization mark, you need to connect to the network and write the authorization mark. You need to write a feature code and a time tag for the initial key file. The time tag is the network time, that is, the real time, which cannot be modified manually. In addition, for confidentiality and security needs, the authorization mark can also be designed as a combination of symbols in multiple internal files. If the authorization mark fails to be read, the software will also fail to run.
[0034] Key file: A file that must be read before the software is started; the key file contains the following information: (1) feature code; (2) time tag; (3) validity period.
[0035] The key file is AES256 encrypted or signed and stored in the software installation package. AES256 encryption is a symmetric encryption algorithm that uses a 256-bit key to encrypt and decrypt data.
[0036] Initial key file: A key file without a signature is an initial key file. Generally, when a customer installs the software and uses it for the first time, they will receive the initial key file from the software developer.
[0037] Signature code: stored in the key file, used to encrypt computer hardware information. When judging whether the software is valid, the signature code information will be decoded and compared with the computer hardware information. If the signature code information does not match the computer hardware information, the software will refuse to run. This design is used to identify the computer and prevent the key file from being copied to other computers for use;
[0038] Time tag: There are multiple time tags, which are recorded in the key file through various encryption methods. When the software reads the time tag, all the time tags should be equal after decryption, otherwise the software cannot run; without a network, the time tag is continuously written by the software calling the computer system time; with a network, the written time tag is the network time. Among them, the network time is required to write the time tag for the initial key file. The time tag is the real time from the network and cannot be modified manually. The time tag is used to record the time when the customer uses the software and compare it with the system time. If the system time is greater than the validity period, the software cannot run. It is saved in a signed or encrypted manner. Different encryption rules and signatures can be set for different customers to ensure that key files cannot be shared between customers.
[0039] System time: refers to the computer system time, which can be modified manually. The computer system time is obtained when the software is running. If there is a network, the network time is obtained. It is used to compare with the validity period in the key file to determine whether the software application is expired.
[0040] Network time: The software reads the network time by connecting to the network. Compared with the computer system time, which can be modified, the network time is the real time and cannot be modified manually. It can be used to determine whether the system time has been modified manually.
[0041] Validity period: the time when the software runs out.
[0042] There are several reasons why the software cannot run:
[0043] (1) There is no initial key file when writing the authorization mark;
[0044] (2) No Internet access;
[0045] (3) The decoded signature information does not match the computer hardware information;
[0046] (4) System time is greater than the validity period; (anti-expiration)
[0047] (5) The system time is less than the time tag (anti-tampering time);
[0048] (6) No key file and no signature code (anti-deletion key file);
[0049] (7) There is a key but no feature code.
[0050] In the first case, the initial key file is reinserted during software use, and then the new network time is written, thus breaking through the limitation of the time tag.
[0051] The second situation is that some instrument and equipment application software has a computer that is not connected to the Internet for a long time, fails to access the network or server time, cannot write a new time tag, and cannot compare with the validity period.
[0052] The third situation specifically involves unauthorized use by a third party.
[0053] The fourth case is that the software continues to be used after it expires and the system time is greater than the time tag.
[0054] In case (5), the computer system time is modified manually. The time tag is written irregularly and is intermittent. The system time is continuous, which means that the network time is less than or equal to the system time in theory. If the system time is less than the time tag, it means that the system time has been modified manually.
[0055] The sixth situation is that when the software usage time exceeds the validity period, the user modifies the computer time and reinstalls the software to invalidate the validity period limit. For example, when the user modifies the system time to be less than the validity period and reinstalls the software, since the software still has the authorization mark after reinstallation, and the newly installed software has no authorization mark, the software is identified as software already in use and a read operation is performed. The feature code is read to determine that it is the computer, and the original time tag is read, and it is found that the time tag is greater than the system time.
[0056] Alternatively, when the third party obtains the software installation package and installs it, the authorization mark is read successfully, indicating that the software is not used for the first time, and then the key file is read to further judge the software. Due to the lack of the key file, the reading fails and the software cannot run.
[0057] The seventh situation is that after the software is installed for the first time, the initial key file is reinserted during the use of the software. When there is no signature code or the signature code is invalid, the use time of the software is no longer controlled. Therefore, even if there is an authorization mark, the software cannot run without the signature code.
[0058] Figure 2 In the above, steps ② and ⑥ can limit the initial key file to be re-inserted during the use of the software, corresponding to case (1);
[0059] Step ④ corresponds to situation (2);
[0060] Steps ⑦⑧ can limit the forgery of key files. If the key files are forged, the time tag and feature code cannot be read correctly and the software cannot run, which corresponds to situation (3).
[0061] In step ⑧, it is determined whether the feature code matches the computer hardware information, and the borrowing of key files between computers can be restricted, which corresponds to the first (3) situation.
[0062] The reading of the validity period in step ⑧ involves different encryption rules and signatures for different customers, which may prevent mutual use between customers, corresponding to case (3).
[0063] Steps ②③④⑤⑥ ensure that the software writes the signature code when it is used for the first time after installation, and obtains the real network time when connected to the Internet, writes the time tag, and records the time tag as the first time tag. In subsequent software operations, the system time must be greater than the first time tag. If the validity period expires, reset the system time, reinstall the software, and re-insert the initial key file. Due to the restrictions of steps ②③④, the real network time tag written can also be judged in step ⑧ that the system time is greater than the validity period, so the software cannot run, corresponding to case (4).
[0064] Steps ⑧⑨⑩ can continuously write time tags to the key file. This method can effectively identify whether the system time has been modified. If the system time has been modified, time will regress, that is, the system time < time tag, and it cannot pass step ⑧, corresponding to case (5).
[0065] Steps ③ and ⑥ can limit the deletion of key files. If the key files are deleted, the software cannot run, which corresponds to situation (6).
[0066] Take the real application scenario as an example:
[0067] Company C develops a software R that can measure and analyze a common sensor S on the market, including analyzing the sensor's measurement accuracy, startup state characteristics, long-term durability, data volatility and other indicators; and the supporting related hardware, such as communication ports and power supply equipment, are relatively common and can be purchased on the market. Therefore, software protection is more important in this scenario. If the software protection fails, it is basically equivalent to the software being open, and any company can use software R to measure and analyze sensor S, and company C's software rights will be seriously infringed.
[0068] Process Description:
[0069] Company C sells software R to company D. The contract states that it is valid for 2 years, starting from today, which is July 31, 2024. That means after the deadline of July 31, 2026, the software will expire and will not work.
[0070] The details are as follows:
[0071] Company C sends software R installation package to Company D, and the authorization mark in R installation package is blank;
[0072] The information in the key file (initial key file) is as follows: (1) the signature is blank; (2) the time tag is blank (or a time less than July 31, 2024); (3) the validity period is July 31, 2026.
[0073] First time installation:
[0074] Company D gets the software R installation package and starts to install it. After installation, the software is run. After the software obtains the operation instructions, such as the software R interface, button clicks, etc., the authorization mark will be read. If the authorization mark is empty, the key file is read. At this time, the key file must be the initial key file, that is, the key file has no feature code. If it meets the above requirements, the initial key file is written. After that, the computer must be connected to the Internet. The role of the network is to facilitate the writing of the real network time to the time tag. The network time cannot be modified manually. At the same time, the key file writes the hardware information of the computer. The hardware information forms the feature code according to certain combination rules; and reads the validity period in the key file and compares it with the current system time. It is found that the validity period is July 31, 2026, which is greater than the current system time, and the software runs. And during the operation, the three information judgments of the time tag and the key file are updated from time to time: feature code matching, time tag <system time, validity period > system time, and the software runs when the conditions are met.
[0075] This process is the first use of the software, and there are several situations:
[0076] When writing the authorization mark, the initial key must be used. Therefore, when the initial key file is not available when writing the authorization mark in type (1), the software cannot run. When the time reaches July 31, 2026, the software expires and cannot work. Company D attempts to keep the software running by modifying the computer system time (to be less than July 31, 2026). Since the time recorded in the time tag when it expires is the time of the operation at that time, the modified system time is less than the time tag, which violates the three information conditions of the key file and the software cannot run.
[0077] When performing a write operation, if there is no network connection as in case (2), it means that the real network time cannot be written into the software, so the software cannot run; the key file writes the hardware information of the computer, and the hardware information forms a feature code according to certain combination rules, the reading stage.
[0078] If the third situation occurs, the decoding feature code information does not match the computer hardware information, and the software cannot run, which can prevent the borrowing of the key file. For example, at this time, there is a company E, which also purchases software R from company C, and the validity period is 3 years. Since company E has a good relationship with company D, company E privately sends key file W to company D; company D puts key file W into software R. At this time, the software still cannot run because the hardware information of the two computers is different, and the feature code matching rules will limit the borrowing of its key file.
[0079] If situation (4) occurs, the system time is less than the time stamp and the software cannot run.
[0080] If the time expires and the system time is greater than the validity period (case (5)), the software cannot run. For example, when the time reaches July 31, 2026, the software expires and cannot work. Company D attempts to keep the software running by modifying the computer system time (to be less than July 31, 2026). Since the time stamp records the time of the operation at the time of expiration, the modified system time is less than the time stamp, which violates the three information conditions of the key file and the software cannot run.
[0081] Modify system time and reinstall software: At this time, Company D will modify the computer system time (less than July 31, 2026), then reinstall the software and re-insert the initial key file. Since the authorization mark of the reinstalled software is empty and the key file is the initial key file, when the software runs to this point, it must be connected to the Internet and read the network time (at this time, the real network time is already after July 31, 2026), otherwise it cannot run. If the network time read through the Internet is written into the time tag, the time tag > system time, the software cannot run. Therefore, no matter how the system time is modified, due to the intervention of the network time, it is impossible to modify the system time to expire the software.
[0082] Anti-cracking: If company D tries to crack the validity period, once the validity period is cracked, the software can be run without restrictions by revising the validity period. However, the validity period is stored in a signature mode, that is, an asymmetric encryption mode, with two sets of passwords M1 and M2. Company C stores password M1, and software R stores password M2. The validity period in the key file is encrypted with password M1. When software R reads the validity period information of the key file, it uses password M2 to decrypt it. This method determines that the possibility of cracking the validity period is zero.
[0083] After the computer is connected to the Internet, the authorization mark, feature code, time tag and validity period are written to the initial key to determine whether the computer meets the three conditions for operation at the same time. If it is running, the time tag is written to the key file from time to time to further determine whether the software meets the three conditions at the same time. If it is, the computer will run. If not, it cannot run. This avoids the problems of computer time being modified, software being reinstalled, and software being illegally used by a third party, and avoids the expiration of the software's validity period limit, so that software development companies can obtain more effective protection of software development rights and interests in product promotion and market development.
[0084] In one embodiment, if there is authorized software, it is further included to determine whether there is a key file and a feature code, and if there is the key file and the feature code, read the internal information of the key file.
[0085] Specifically, when a user installs the software and uses it for the first time, an authorization mark, a feature code and a time tag are written into the software.
[0086] Therefore, when the user starts the software for the second time or the nth time, if the result of determining whether the software has an authorization mark is yes, the next step is to determine whether there is a key and a feature code. If there is a feature code, the process goes to step S3 to read the internal information of the key file, where the internal information includes a feature code, a time tag, and a validity period. The process goes to step S4 to run the software to determine whether the three conditions of the feature code matching the computer hardware information, the system time being greater than the time tag, and the system time being less than the validity period are simultaneously met. If not, the software cannot run. If so, a time tag is written to the software from time to time, and the written time tag is judged in real time to determine whether the above three conditions are simultaneously met.
[0087] The corresponding real-world application scenarios include:
[0088] The computer needs to determine whether there is an authorization mark. If there is an authorization mark, it means that the software has been installed and is not being installed for the first time. It is necessary to further determine whether the user of the software is a first-time user. It is necessary to determine whether the software has a key file and a feature code. The feature code is specifically the hardware information of the computer. The hardware information is constructed according to certain rules. Its purpose is to be used as the computer's unique identity, thereby identifying the computer's identity.
[0089] If there is a key file and a signature code, it proves that the same user is using the software. Go to the next step and read the internal information of the key file by decoding or signature verification: signature code, time tag, validity period, and then determine whether the following three conditions are met at the same time:
[0090] First, the signature matches the computer hardware information; second, the system time is greater than the time tag; third, the system time is less than the validity period. If the system time is greater than the time tag, it means that the system time has not been modified manually, and if the system time is less than the validity period, it means that the usage time has not exceeded the preset time range. In this case, the software can run normally. When the software is running, it writes a time tag to the key file from time to time, and compares the time tag with the system time to determine whether the system time has been modified manually.
[0091] For example:
[0092] To prevent the matching rules of the feature codes from restricting the borrowing of key files due to the different hardware information of the two computers, if a company E also purchases software R from company C with a validity period of 3 years, and since company E has a good relationship with company D, company E privately sends key file W to company D; company D puts key file W into software R. At this time, the software still cannot run because the hardware information of the two computers is different and the matching rules of the feature codes will restrict the borrowing of key files.
[0093] When company D opens software R for the second or nth time to operate, the software recognizes the operation and starts to read the authorization mark. If the software has the authorization mark, it reads the key file. At this time, the key file must be a key file with a feature code, not an initial key file. After reading the three pieces of information in the key file, it enters the three-item information judgment (feature code matching, time tag < system time, validity period > system time). If the conditions are met, the software starts to run. The possible situations in this process include the above-mentioned situation (3) the decoded feature code information does not match the computer hardware information (anti-copying); (4) the system time is greater than the validity period (anti-expiration); (5) the system time is less than the time tag (anti-modification time).
[0094] Time expiration: When the time reaches July 31, 2026, the software expires and cannot work. Company D tries to keep the software running by modifying the computer system time (to be less than July 31, 2026). Since the time stamp records the time of the operation at the time of expiration, the modified system time is less than the time stamp, which violates the three information conditions of the key file and the software cannot run.
[0095] Modify system time: At this time, Company D will modify the computer system time (less than July 31, 2026), then reinstall the software and re-insert the initial key file. Since the authorization mark of the reinstalled software is empty and the key file is the initial key file, when the software runs to this point, it must be connected to the Internet and read the network time (at this time, the real network time is already after July 31, 2026), otherwise it cannot run. If the network time read by the Internet is written into the time tag, the time tag> system time, the software cannot run. Therefore, no matter how the system time is modified, due to the intervention of the network time, it is impossible to modify the system time to expire the software.
[0096] If company D tries to crack the validity period, once the validity period is cracked, the software can be run without restrictions by revising the validity period. However, the validity period is stored in a signature mode, that is, an asymmetric encryption mode, with two sets of passwords M1 and M2. Company C stores password M1, and software R stores password M2. The validity period in the key file is encrypted with password M1. When software R reads the validity period information of the key file, it uses password M2 to decrypt it. This method determines that the possibility of cracking the validity period is zero.
[0097] Preventing the borrowing of key files: At this time, a company E also purchased software R from company C, and the validity period was 3 years. Since company E had a good relationship with company D, company E privately sent key file W to company D; company D put key file W into software R. At this time, the software still could not run, because the hardware information of the two computers was different, and the feature code matching rules would limit the borrowing of its key file.
[0098] By determining whether there are authorization marks, feature codes, time tags and validity periods, it is determined whether the computer meets the three conditions for running at the same time. If it is running, a time tag is written to the key file from time to time to further determine whether the software meets the three conditions at the same time. If it is, the computer runs; if not, it cannot run. This avoids problems such as computer time being modified, software being reinstalled, and software being illegally used by a third party, and avoids the expiration of the software's validity period limit, so that software development companies can obtain effective protection of their software development rights and interests in product promotion and market development.
[0099] In one embodiment, the software cannot run without any one or both of the key file and the feature code.
[0100] Specifically,
[0101] The first case: If the key file is manually deleted after the software is installed, when it is used, after determining that there is an authorization mark, it will further determine whether there is a key file. If it is determined that there is no key file, the software cannot run;
[0102] The corresponding real-world application scenarios include:
[0103] When Company D opens Software R for the second or nth time, it deletes the key file to break the time limit. However, after opening the software, the software cannot be run because it is determined in step ⑥ that there is no key file.
[0104] The second case: If there is a key file but no signature code, it means that the software has not been written with a signature code due to piracy or other reasons, which further proves that the software does not correspond to a unique computer, so the software cannot run.
[0105] The corresponding real-world application scenarios include:
[0106] When Company D opens Software R for the second or nth time, it reinserts the initial key file. However, the feature code of the initial key file is inconsistent with the hardware information of the computer, so the software cannot run.
[0107] Preventing the deletion of key files and thus preventing the failure of computer hardware information recognition can prevent unauthorized copying and use of software and protect the rights and interests of software development companies.
[0108] In one embodiment, the S1 also includes that the software cannot run without the initial key file.
[0109] Specifically, the absence of the initial key means that the software is pirated or for other reasons, and the software cannot be run without the initial key.
[0110] The corresponding real-world application scenarios include:
[0111] Preventing the initial key from being borrowed: When the validity period of company D's software has expired, company D attempts to reinstall the software and requires company E to send the initial key file W. The software will write the authorization mark and the time tag according to the process. However, when reading the validity period of the key file, because the encryption rules of the validity period of the key file of software R sold by company C to company D and company E are different, the validity period information read is garbled, which is equivalent to having no initial key file, so the software cannot run, preventing the software from being copied and used without authorization and protecting the rights and interests of software development companies.
[0112] In one embodiment, the S1 also includes that if there is no network connection, the software cannot run.
[0113] Specifically, when installing the software for the first time, you first need to determine whether there is an authorization mark. If there is no authorization mark, then determine whether there is a key file and whether it is the initial key file. If so, you need to write the authorization mark and write the feature code and time tag to the initial key file. The prerequisite for executing this step is to be connected to the Internet. If there is no Internet connection, the software cannot run.
[0114] The corresponding real-world application scenarios include:
[0115] Company D obtains the software R installation package and starts to install it. After the installation, the software is run. After the software recognizes the operation, such as the software R interface, button clicks, etc., it reads the authorization mark and finds that the authorization mark is empty. It reads the key file. At this time, the key file must be the initial key file, that is, the key file has no feature code. If it meets the above requirements, the initial key file is written. At this time, if the computer used by company D to install software R is not connected to the Internet, the software cannot run.
[0116] Avoid the failure of computer identity recognition due to the computer being not connected to the Internet, which would invalidate the software validity period limit, thereby protecting the rights and interests of software development companies.
[0117] In one embodiment, S4 also includes the software continuing to run if the feature code matches the computer hardware information, the system time is greater than the time tag, and the system time is less than the validity period.
[0118] Specifically, the feature code matches the computer hardware information, indicating that the identity of the computer is certain and it is the computer when the software is installed. The system time is greater than the time tag, indicating that the system time has not been modified manually. The system time is less than the validity period, indicating that the software has not been used beyond the preset period.
[0119] The corresponding real-world application scenarios include:
[0120] Company D gets the software R installation package and starts to install it. After installation, the software is run. The software reads the authorization mark, reads the key file, writes the initial key file, writes the real network time to the time tag, and writes the hardware information feature code of the computer to the key file. The software also reads the validity period in the key file and compares it with the current system time. It is found that the validity period is July 31, 2026, which is greater than the current system time, and the software runs. The software also updates the three information judgments of the time tag and the key file from time to time during operation (feature code matching, time tag <system time, validity period > system time). If the conditions are met, the software will start running.
[0121] Setting a good usage period for the software can prevent the software from being used beyond the validity period and protect the rights and interests of the software development company.
[0122] In one embodiment, the S4 further comprises writing the time stamp from the system time to the software.
[0123] Specifically, the computer system time obtained when the software is running, and the network time if there is a network, is used to compare with the validity period in the key file to determine whether the software application has expired. When writing the authorization mark, it must be the network time, and the real time when the software was installed is obtained. If the system time has been manually modified, it is judged based on the network time.
[0124] Specifically, the corresponding real-world application scenarios include:
[0125] Company D obtains the software R installation package and starts to install it. After installation, it periodically updates the time tag and three pieces of information of the key file during operation (signature code matching, time tag <system time, validity period > system time). When the conditions are met, the software starts running. During the operation, the key file periodically obtains the system time from the system and updates the write time tag.
[0126] When the software is running and the computer is not connected to the Internet, the software obtains the system time, which improves selectivity and allows it to run more quickly. It makes the above three information judgments to prevent the software validity period from becoming invalid and to prevent the software from being copied and used without authorization, thereby protecting the rights and interests of software development companies.
[0127] In one embodiment, S3 further includes reading the plurality of feature codes and obtaining the number of the plurality of feature codes as a preset value of the feature code.
[0128] Specifically, when acquiring the feature code information, it is also necessary to acquire the number of feature codes to determine the number used by the software.
[0129] The corresponding real-world application scenarios include:
[0130] When Company C and Company E signed the contract, they stipulated the number of computers allowed to be installed, and the number of computers was the number of feature codes.
[0131] Company E directly packages the software R purchased from Company C together with the initial key file and sends it to Company D. At the same time, Company C can also establish a server background. When the software is run for the first time, it must connect to the Internet to write a time tag. Taking advantage of this opportunity to connect to the Internet, it obtains the number of installed computers through feature codes or other means, and then knows the number of computers installed by the other party. If it does not exceed the preset value, the software can run.
[0132] By obtaining the real-time number of feature codes, it is ensured that the number of software uses does not exceed the preset value, preventing the software from being copied and used without authorization, and protecting the rights and interests of software development companies.
[0133] In one embodiment, S4 also includes that the software must be connected to the Internet when it is first started, and the real-time number of feature codes is obtained and compared with the preset value. If the real-time number is greater than the preset value, the software cannot run.
[0134] Specifically, the corresponding real-world application scenarios include:
[0135] After the software is installed, it must be connected to the Internet for the first time it is run. This is an opportunity to read the feature code and enter the backend server of Company C. If the number of feature codes exceeds the required number, it means that the number of computers installed by Company E exceeds the contract requirement, and the software cannot run. For example, Company E has 20 computers that need to install the software R. After installing it on the company's computers, Company E packages the software R together with the initial key file and sends it to Company D or other companies. If Company D installs the software R, the backend server of Company C will obtain the number of feature codes when the software is started for the first time after Company D installs it. If the number of feature codes exceeds 20, it means that someone has copied the software and used it illegally. At this time, the software stops running. By obtaining the real-time number of feature codes when the software is started for the first time, unauthorized software outside the preset value cannot run, thus protecting the rights and interests of software development companies.
[0136] A key file device for limiting the validity period of software includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program can be executed by the processor to implement the method described in any one of the above embodiments.
[0137] Specifically, the computer is not limited to one type, for example, a mobile phone, a computer, and other microcomputers. By using the installation key file, the validity period of the software is limited and the software is prevented from being copied and used without authorization, so that the rights and interests of the software development company are protected.
[0138] In view of the problem that the validity period of the key is easy to expire and unauthorized copying and use in the prior art, the present invention installs the key file as a must-read file for software startup on the software. Generally, when the user first installs the software, that is, when the software is started, the user will receive the initial key file sent by the software developer; the key file includes: a feature code, a time tag, and an effective use time. The feature code is used to identify the computer identity, and the time tag is used to mark the use time of the software and prevent the computer time from being modified. The key file without a feature code is the initial key file. At this time, the computer must be connected to the Internet to write an authorization mark to the software and write a feature code (computer hardware information) to the initial key file. If the authorization code, network connection, feature code, time tag, and validity period are not met at the same time, the software cannot run. The problem of the computer system time being modified, the computer being disconnected from the Internet for a long time, the validity period limit being invalid after the software is reinstalled, and the unauthorized copying and use is avoided. The method protects the relevant rights and interests of the software developer or the software owner. If the user wants to continue to use it, he must purchase the software validity period; at the same time, the validity period protection method enables the software development company to obtain a practical guarantee of the software development rights and interests in product promotion and market development.
[0139] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention is described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A key file method for limiting the validity period of software, characterized in that: include: S1, obtain the startup instruction, determine whether there is an authorization mark, if there is no authorization mark, determine whether there is an initial key file and whether the network is connected; S2, if there is an initial key file and the network is connected, then write the authorization mark, and write the feature code and time tag to the initial key file, the feature code is used to match the computer hardware information, the time tag includes the real network time, and the initial key file becomes a key file after the feature code is written; S3, reading the internal information of the key file, the internal information including a feature code, a time tag and a validity period; S4, run the software to determine whether the three conditions of feature code matching computer hardware information, system time being greater than the time tag, and system time being less than the validity period are met at the same time. If not, the software cannot run. If so, run the software and write the time tag to the software from time to time, and make a real-time judgment on the written time tag to confirm whether the above three conditions are met at the same time.
2. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S1 also includes determining whether there is a key file and a feature code if there is an authorization mark, and reading the internal information of the key file if there is the key file and the feature code.
3. A key file method for limiting the validity period of software according to claim 2, characterized in that: The determining whether there is a key file and a feature code also includes that if any one or both of the key file and the feature code are not present, the software cannot run.
4. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S1 also includes that the software cannot run without the initial key file.
5. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S1 also includes that if there is no network connection, the software cannot run.
6. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S4 also includes running the software if the characteristic code matches the computer hardware information, the system time is greater than the time tag, and the system time is less than the validity period.
7. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S4 also includes writing the time stamp from the system time to the software.
8. A key file method for limiting the validity period of software according to claim 1, characterized in that: The S3 further includes reading the plurality of feature codes and obtaining the number of the plurality of feature codes as a preset value of the feature code.
9. A key file method for limiting the validity period of software according to claim 8, characterized in that: The S4 also includes obtaining the real-time number of the feature code at irregular intervals and comparing it with the preset value. If the real-time number is greater than the preset number, the software cannot run.
10. A key file device for limiting the validity period of software, comprising a processor and a memory, wherein a computer program is stored in the memory, characterized in that: The computer program can be executed by a processor to implement the method according to any one of claims 1 to 9.