Software validity maintenance method and device, electronic equipment and storage medium

By encrypting the storage and locking of the operation data of the target software, the problem of the easy tampering or deletion of the software operation data in the prior art is solved, ensuring the effectiveness and authenticity of the software.

CN119646768APending Publication Date: 2025-03-18CHENGDU GONGDING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411628897.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing software operation data and licenses lack a network verification mechanism, which is easily tampered with or deleted, making it difficult to maintain the effectiveness of the software.

Method used

When the target software exits the running state, its running data is encrypted and stored in a specified sector on the hard disk, and locked the sector. When the target software enters the running state, the running data is read from the specified sector and determines whether the running conditions are met based on the license information and the running data.

Benefits of technology

Ensure the authenticity of the operating data of the target software, prevent tampering and deletion, and accurately maintain the effectiveness of the software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646768A_ABST
    Figure CN119646768A_ABST
Patent Text Reader

Abstract

The invention discloses a software validity maintenance method and device, electronic equipment and a storage medium, and the method comprises the steps: responding to target software to quit an operation state, encrypting operation data of the target software, storing the operation data in a target sector in a hard disk, and locking the target sector; in response to the operation state of the target software, reading operation data of the target software from the target sector; based on the license information of the target software and the operation data of the target software, judging whether the target software meets an operation condition or not; and if the target software meets the operation condition, continuing to operate the target software. The authenticity of the operation data of the target software can be ensured, and then the effectiveness of the target software is accurately maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software technology, and in particular to a method, device, electronic device and storage medium for maintaining software validity. Background Art

[0002] Generally, a software license will include the validity period, the machine information used, the functions of the software used, etc. When the user obtains the software license, the software itself will verify whether the machine information in the license is consistent with the currently running machine, whether the period of use is valid, and whether the functions used are enabled, to determine the actual use of the software. Existing software operation data and licenses are usually stored in a specific area in the hard disk file system. Since these data lack a verification mechanism on the network side, they are very easy to be tampered with or deleted. In addition, if the user performs operations such as reinstalling the system or formatting the hard disk, these stored data files may encounter the problem of file header loss. The loss of the file header will cause the operating system to be unable to access the software's operation data and license information normally. Due to the tampering, deletion or loss of the file header of the operation data, it may be difficult to verify the authenticity of the operation data and license information, resulting in the inability to accurately maintain the validity of the software. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for maintaining software validity, which can ensure the authenticity of the target software running data, thereby ensuring the validity of the target software.

[0004] In order to achieve the above objectives, the present application embodiment adopts the following technical solutions: In a first aspect, an embodiment of the present application provides a method for maintaining software validity, including: In response to the target software exiting the running state, the running data of the target software is encrypted and stored in the target sector of the hard disk, and the target sector is locked; in response to the target software entering the running state, the running data of the target software is read from the target sector; based on the license information of the target software and the running data of the target software, it is determined whether the target software meets the running conditions; if the running conditions are met, the target software continues to run.

[0005] In one embodiment, before encrypting and storing the running data of the target software in the target sector of the hard disk in response to the target software exiting the running state, the method also includes: processing the license of the target software based on a preset encryption algorithm to obtain the corresponding encrypted ciphertext; performing cardinality encoding on the encrypted ciphertext and mapping and converting the encoding result to obtain the sector address corresponding to the target sector.

[0006] In one embodiment, after encrypting and storing the running data of the target software in the target sector of the hard disk, the method further includes: copying the running data in the target sector to multiple sectors and locking the multiple sectors.

[0007] In one implementation, the locking process includes: obtaining a file cluster corresponding to the sector to be locked; and marking a metafile corresponding to the file cluster as being used.

[0008] In one embodiment, in response to the target software entering the running state, the running data of the target software is read from the target sector, including: obtaining the sector address corresponding to the target sector according to the preset encryption algorithm, and detecting whether the running data stored in the target sector is damaged; if the running data stored in the target sector is not damaged, reading the running data stored in the target sector.

[0009] In one embodiment, the method further includes: if the operating data stored in the target sector has been damaged, respectively obtaining the sector addresses of the multiple sectors and traversing the data stored in the multiple sectors until the undamaged operating data is obtained; and reading the undamaged operating data.

[0010] In one embodiment, judging whether the target software meets the operating conditions based on the license information of the target software and the operating data of the target software includes: decrypting the operating data to obtain decrypted data; the decrypted data includes the accumulated operating time of the target software; comparing the accumulated operating time with the allowed operating time recorded in the license of the target software to determine whether the target software meets the operating conditions based on the comparison result.

[0011] In a second aspect, the present application provides a software validity maintenance device, comprising: A storage module, used for encrypting and storing the running data of the target software in a target sector of the hard disk and locking the target sector when the target software exits the running state; A reading module, used for reading the running data of the target software from the target sector when the target software enters the running state; A judgment module, used for judging whether the target software meets the running conditions based on the license information of the target software and the running data of the target software; The control module is used to control the target software to continue running when the target software meets the running conditions.

[0012] In one embodiment, the storage module is also used to: process the license of the target software based on a preset encryption algorithm to obtain a corresponding encrypted ciphertext; perform cardinality encoding on the encrypted ciphertext, and perform mapping conversion processing on the encoding result to obtain a sector address corresponding to the target sector.

[0013] In one implementation, the storage module is specifically configured to copy the operation data in the target sector to multiple sectors, and lock the multiple sectors.

[0014] In one embodiment, the device further comprises a locking module, which is used to obtain a file cluster corresponding to the sector to be locked; and mark the metafile corresponding to the file cluster as being used.

[0015] In one embodiment, the reading module is specifically used to: obtain the sector address corresponding to the target sector according to the preset encryption algorithm, and detect whether the operating data stored in the target sector is damaged; if the operating data stored in the target sector is not damaged, read the operating data stored in the target sector.

[0016] In one embodiment, the reading module is further used to: when the operating data stored in the target sector has been damaged, respectively obtain the sector addresses of the multiple sectors and traverse the data stored in the multiple sectors until the undamaged operating data is obtained; and read the undamaged operating data.

[0017] In one embodiment, the judgment module is specifically used to: decrypt the running data to obtain decrypted data; the decrypted data includes the cumulative running time of the target software; based on the cumulative running time and the allowed running time recorded in the license of the target software, compare to determine whether the target software meets the running conditions according to the comparison result.

[0018] In a third aspect, the present application provides an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the steps of the software validity maintenance method as described in any one of the first aspects.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, which, when instructions in the computer-readable storage medium are executed by a processor, implements the steps of the method for maintaining software validity described in any one of the first aspects.

[0020] The software validity maintenance method, device, electronic device and storage medium provided in the present application include: in response to the target software exiting the running state, encrypting the running data of the target software and storing it in the target sector of the hard disk, and locking the target sector; in response to the target software entering the running state, reading the running data of the target software from the target sector; judging whether the target software meets the running conditions based on the license information of the target software and the running data of the target software; if the running conditions are met, continuing to run the target software. Therefore, the software validity maintenance method, device, electronic device and storage medium provided in the present application store the running data of the target software in a designated area of ​​the hard disk and lock the designated area. When the target software enters the running state, the running data of the target software is read from the designated area, so as to judge whether the target software is still within the valid use period according to the running data of the target software. Storing the running data in the designated area of ​​the hard disk and locking the area where the running data is stored can prevent the running data of the target software from being deleted or tampered with, thereby ensuring the authenticity of the running data of the target software, and then accurately maintaining the validity of the target software. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of a method for maintaining software validity provided by an embodiment of the present application; Figure 2 A schematic diagram of the structure of a software validity maintenance device provided by an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. 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 without making creative work are within the scope of protection of the present application.

[0023] The terms "first", "second", etc. in this specification and claims are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this way can be interchanged where appropriate so that the embodiments of the present application are implemented in a sequence other than those illustrated or described herein. In addition, "and / or" in this specification and claims means at least one of the connected objects, and the character " / " generally means that the objects associated with each other are in an "or" relationship.

[0024] See also Figure 1 , is a flowchart of a method for maintaining software validity provided in an embodiment of the present application. The method for maintaining software validity can be executed by a device for maintaining software validity provided in an embodiment of the present application. The device can be implemented in software and / or hardware, such as a server, a computer, a processor, or other electronic device. In this embodiment, the execution subject of the method for maintaining software validity is a computer processor as an example. The method for maintaining software validity provided in this embodiment includes: Step S1, in response to the target software exiting the running state, encrypting the running data of the target software and storing it in the target sector of the hard disk, and locking the target sector.

[0025] When the target software is in the running state, its running data is recorded by a log file, and the running data recorded by the log file is temporarily stored in the memory of the system where the target software is located. In the embodiment of the present application, the encryption or storage of the running data can also be triggered by a timer, that is, when the software exits the running state or receives a signal from the timer, the running data temporarily stored in the memory is encrypted, and then the encrypted running data is stored in the target sector of the hard disk. In this way, the running data of the target software can be encrypted and stored in time, and the security of the running data of the target software is further guaranteed by locking the target sector.

[0026] In the embodiment of the present application, an encryption key is randomly generated by a specific encryption algorithm, and the length and type of the key are determined to ensure the security of encryption. For example, the encryption algorithm may be AES, DES, RSA, etc.

[0027] In one embodiment, in response to the target software exiting the running state, before encrypting the running data of the target software and storing it in the target sector of the hard disk, the method also includes: processing the license of the target software based on a preset encryption algorithm to obtain the corresponding encrypted ciphertext; performing cardinality encoding on the encrypted ciphertext, and mapping and converting the encoding result to obtain the sector address corresponding to the target sector.

[0028] It is understandable that the software license usually contains the user's usage permission information. By encrypting the target software's license and obtaining the sector address from it, the target software can verify whether the user has the permission to access specific data. By binding the target sector address with the license encryption information, it is possible to prevent unauthorized users from accessing the target sector to steal or tamper with the operating data, thereby enhancing the security of the operating data.

[0029] Preferably, the encryption algorithm used to encrypt the license in this embodiment can select AES, which is a generalized symmetric encryption algorithm and is considered to be one of the most secure encryption algorithms currently. The AES algorithm supports 128-bit, 192-bit and 256-bit key lengths. Therefore, the use of the AES algorithm can maximize the use of computing resources, and it is extremely difficult to crack the encryption, which can ensure the security and reliability of the license. The encoding method used in this embodiment is base64 radix encoding, that is, the target sector address = Func (base64 (AES (License))).

[0030] In one embodiment, after encrypting and storing the running data of the target software in the target sector of the hard disk, the method further includes: copying the running data in the target sector to multiple sectors, and locking the multiple sectors.

[0031] It can be understood that in order to prevent abnormal writing of the hard disk, the operating data in the target sector is synchronously copied to multiple sectors. The method for obtaining the addresses of these sectors is similar to the method for obtaining the address of the target sector, that is, the address of the Nth sector = FuncN(base64(AES(License))). In this embodiment, there is no restriction on the number of sectors N, and it can be any number greater than 1. By synchronously copying the operating data in the target sector to multiple sectors, the operating data is made redundant. When the operating data in one sector is damaged, the operating data of other sectors can be obtained.

[0032] In one implementation, the locking process includes: obtaining a file cluster corresponding to a sector to be locked; and marking a metafile corresponding to the file cluster as being used.

[0033] It is understandable that, since the Windows operating system generally uses NTFS as the file system, NTFS consists of metafiles such as the master file table (MFT), bitmap file (Bitmap), and log file (Logfile). The metafile ($Bitmap) records the usage of the file clusters. Each bit in the file represents the usage of each cluster in the drive, where "0" means unused and "1" means used. For the file system, if the flag is "1", the corresponding file cluster will no longer be allocated. Therefore, it is only necessary to find the file cluster corresponding to each sector and set the corresponding position of the metafile corresponding to the file cluster to "1" to complete the locking of the corresponding sector. In this way, it can prevent the running data in the sector from being overwritten, thereby causing the running data to become invalid.

[0034] Specifically, assuming that Sector1 represents the target sector, Sector2, ..., SectorN represent other sectors, and Cluster1, Cluster2, ..., ClusterN represent the file clusters corresponding to Sector1, Sector2, ..., SectorN respectively, then you only need to find the corresponding positions of the metafiles ($Bitmap) corresponding to Cluster1, Cluster2, ..., ClusterN and set them to "1" to complete the locking of sectors Sector1, Sector2, ..., SectorN.

[0035] Step S2, in response to the target software entering the running state, reading the running data of the target software from the target sector.

[0036] It can be understood that reading the operating data stored in the target sector when the software enters the operating state can verify the validity of the target software and ensure that the target software is only operated with authorization.

[0037] In one embodiment, in response to the target software entering the running state, the running data of the target software is read from the target sector, including: obtaining the sector address corresponding to the target sector according to a preset encryption algorithm, and detecting whether the running data stored in the target sector is damaged; if the running data stored in the target sector is not damaged, reading the running data stored in the target sector.

[0038] Here, the address of the target sector is obtained by using the key generated by the preset encryption algorithm when encrypting the target license. After obtaining the address of the target sector, the operating system can be requested to read the operating data stored in the sector. It can be understood that since the sector is the smallest unit of disk reading and writing, the operating system can provide the ability to read the content of a specific sector. After determining the address of the target sector, the operating data can be tested by checking the sum / hash value, checking the digital signature, checking the integrity of the encrypted data, etc., to ensure that the read operating data is correct, thereby ensuring the authenticity of the operating data.

[0039] In one embodiment, the method further includes: if the operating data stored in the target sector has been damaged, respectively obtaining sector addresses of multiple sectors and traversing the data stored in the multiple sectors until undamaged operating data is obtained; and reading the undamaged operating data.

[0040] In this embodiment, when the operating data of the target sector is destroyed, the address of other sectors storing the operating data of the target software is obtained by obtaining the target sector address, and then the operating data in other sectors is verified by the same method to ensure that the read operating data is authentic.

[0041] Specifically, the target license file is read through the target software, and according to the preset encryption algorithm Func(base64(AES(License))) mentioned above, the address of the corresponding sector Sector1 is found, and the encrypted operation data therein is read. If the encrypted operation data in Sector1 is damaged, Sector2 is found through Func2(base64(AES(License))). If the encrypted operation data in Sector2 is damaged, the next Sector is found in sequence until a sector with intact operation data is found, and the encrypted operation data is read therefrom, thereby ensuring the authenticity and integrity of the read operation data.

[0042] Step S3, judging whether the target software meets the operating conditions based on the license information of the target software and the operating data of the target software.

[0043] In the above, the target software license is encrypted and encoded, the location of the target sector in the hard disk is determined, and the target software operation data is encrypted and stored in the target sector, and only the key generated by encryption can read the operation data stored in the sector. Therefore, it can be ensured that the target software license and the target software operation data are both authentic, thereby ensuring the accuracy of the judgment result.

[0044] In one embodiment, based on the license information of the target software and the operating data of the target software, determining whether the target software meets the operating conditions includes: decrypting the operating data to obtain decrypted data; the decrypted data includes the accumulated operating time of the target software; comparing the accumulated operating time with the allowed operating time recorded in the license of the target software to determine whether the target software meets the operating conditions based on the comparison result.

[0045] Specifically, when the allowed running time recorded in the license is greater than or equal to the accumulated running time, it is determined that the target software meets the running condition, otherwise it does not meet the running condition.

[0046] Step S4: If the running conditions are met, continue to run the target software.

[0047] When the running conditions are met, the target software continues to run; when the running conditions are not met, the target software is controlled to exit the running state. In this way, the reliability, security and overall performance of the software can be improved, while providing a more stable and manageable software environment for users, developers and system administrators.

[0048] The software validity maintenance method provided by the present application is to store the running data of the target software in a designated area of ​​the hard disk and lock the designated area. When the target software enters the running state, the running data of the target software is read from the designated area, so as to judge whether the target software is still within the valid use period according to the running data of the target software. Storing the running data in the designated area of ​​the hard disk and locking the area where the running data is stored can prevent the running data of the target software from being deleted or tampered with, thereby ensuring the authenticity of the running data of the target software and further ensuring the validity of the target software.

[0049] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0050] With the above Figure 1 Corresponding to the software validity maintenance method shown, the present application embodiment also provides a software validity maintenance device. Figure 2 , is a schematic diagram of a software validity maintenance device provided by an embodiment of the present application, the device comprising: A storage module, used for encrypting and storing the running data of the target software in a target sector of the hard disk and locking the target sector when the target software exits the running state; A reading module, used for reading the running data of the target software from the target sector when the target software enters the running state; A judgment module, used for judging whether the target software meets the running conditions based on the license information of the target software and the running data of the target software; The control module is used to control the target software to continue running when the target software meets the running conditions.

[0051] In one embodiment, the storage module is also used to: process the license of the target software based on a preset encryption algorithm to obtain a corresponding encrypted ciphertext; perform cardinality encoding on the encrypted ciphertext, and perform mapping conversion processing on the encoding result to obtain a sector address corresponding to the target sector.

[0052] In one implementation, the storage module is specifically configured to copy the operation data in the target sector to multiple sectors, and lock the multiple sectors.

[0053] In one embodiment, the device further comprises a locking module, which is used to obtain a file cluster corresponding to the sector to be locked; and mark the metafile corresponding to the file cluster as being used.

[0054] In one embodiment, the reading module is specifically used to: obtain the sector address corresponding to the target sector according to the preset encryption algorithm, and detect whether the operating data stored in the target sector is damaged; if the operating data stored in the target sector is not damaged, read the operating data stored in the target sector.

[0055] In one embodiment, the reading module is further used to: when the operating data stored in the target sector has been damaged, respectively obtain the sector addresses of the multiple sectors and traverse the data stored in the multiple sectors until the undamaged operating data is obtained; and read the undamaged operating data.

[0056] In one embodiment, the judgment module is specifically used to: decrypt the running data to obtain decrypted data; the decrypted data includes the cumulative running time of the target software; based on the cumulative running time and the allowed running time recorded in the license of the target software, compare to determine whether the target software meets the running conditions according to the comparison result.

[0057] The specific definition of the software validity maintenance device can be found in the definition of the software validity maintenance method mentioned above, which will not be repeated here. Each module in the above-mentioned software validity maintenance device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor of the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0058] According to another embodiment of the present application, Figure 2 The various units in the software validity maintenance device shown can be separately or completely combined into one or several other units to form, or one (some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the software validity maintenance device may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0059] According to another embodiment of the present application, the program can be executed on a general computing device such as a computer including a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), and other processing elements and storage elements. Figure 1 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Figure 2 The software validity maintenance device shown in and the software validity maintenance method for implementing the embodiment of the present application. The computer program can be recorded on, for example, a computer readable storage medium, and transferred to an electronic device through the computer readable storage medium and run therein.

[0060] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 3At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0061] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0062] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0063] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a data processing device at the logical level. The processor executes the program stored in the memory and is specifically used to execute the software validity maintenance method provided in this embodiment.

[0064] The electronic device may also perform Figure 1 The method shown in the figure and the maintenance device for realizing software effectiveness are Figure 1 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0065] Of course, in addition to software implementation, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0066] An embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions, which, when executed by a portable electronic device including multiple applications, can enable the portable electronic device to execute the software validity maintenance method provided by the present application.

[0067] In short, 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 shall be included in the protection scope of the present application.

[0068] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0069] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0070] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0071] Each embodiment in this specification is described in a progressive 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 system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for maintaining software effectiveness, characterized in that: include: In response to the target software exiting the running state, encrypting the running data of the target software and storing it in the target sector of the hard disk, and locking the target sector; In response to the target software entering a running state, reading running data of the target software from the target sector; Based on the license information of the target software and the operation data of the target software, determining whether the target software meets the operation conditions; If the running conditions are met, continue to run the target software.

2. The method according to claim 1, characterized in that Before encrypting and storing the running data of the target software in the target sector of the hard disk in response to the target software exiting the running state, the method further includes: Processing the license of the target software based on a preset encryption algorithm to obtain a corresponding encrypted ciphertext; The encrypted ciphertext is radix-encoded, and the encoding result is mapped and transformed to obtain a sector address corresponding to the target sector.

3. The method according to claim 1, characterized in that After encrypting and storing the target software's running data in the target sector of the hard disk, the method further includes: The operation data in the target sector is copied to a plurality of sectors, and the plurality of sectors are locked.

4. The method according to claim 3, characterized in that The locking process includes: Get the file cluster corresponding to the sector to be locked; The metafile corresponding to the file cluster is marked as being used.

5. The method according to claim 3, characterized in that: In response to the target software entering the running state, reading the running data of the target software from the target sector comprises: Acquiring a sector address corresponding to the target sector according to the preset encryption algorithm, and detecting whether the operation data stored in the target sector is damaged; If the operating data stored in the target sector is not damaged, the operating data stored in the target sector is read.

6. The method according to claim 5, characterized in that The method further comprises: If the operating data stored in the target sector has been damaged, the sector addresses of the multiple sectors are respectively obtained, and the data stored in the multiple sectors are traversed until the operating data that has not been damaged is obtained; The uncorrupted operating data is read.

7. The method according to claim 5 or 6, characterized in that: The determining whether the target software meets the operating conditions based on the license information of the target software and the operating data of the target software includes: Decrypting the running data to obtain decrypted data; the decrypted data includes the accumulated running time of the target software; The accumulated running time is compared with the allowed running time recorded in the license of the target software to determine whether the target software meets the running conditions according to the comparison result.

8. A software validity maintenance device, characterized in that: include: A storage module, used for encrypting and storing the running data of the target software in a target sector of the hard disk and locking the target sector when the target software exits the running state; A reading module, used for reading the running data of the target software from the target sector when the target software enters the running state; A judgment module, used for judging whether the target software meets the running conditions based on the license information of the target software and the running data of the target software; The control module is used to control the target software to continue running when the target software meets the running conditions.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the steps of the method for maintaining software validity as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor, the steps of the method for maintaining software validity as described in any one of claims 1 to 7 are implemented.