Distributed cluster-based software authorization method and device, equipment and medium
By distributing and encrypting the application code in a distributed cluster, the problem of authorization codes becoming invalid due to changes in cluster information in traditional software licensing technology is solved, thus achieving more secure and reliable authorization verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGKE XINGTU INTELLIGENT TECH CO LTD
- Filing Date
- 2023-03-06
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional software licensing technologies suffer from the problem of failing to correctly verify the license code when cluster information changes, especially when IP addresses change, hard drives are replaced, or nodes are added, causing the license code to become invalid.
In a distributed cluster environment, a distributed storage approach is adopted, where application codes are stored separately in containers and databases. Unique application codes are generated through encryption and salting, and multi-level verification is performed to ensure the security and reliability of authorization.
It enables secure and reliable software authorization in complex and ever-changing cluster information environments, preventing authorization codes from becoming invalid due to changes in cluster information, and improving the security and flexibility of authorization verification.
Smart Images

Figure CN116226793B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer application technology, and in particular to software licensing methods, apparatus, devices and media based on distributed clusters. Background Technology
[0002] The core concept of software protection is to prevent software piracy. Software licensing is an extension and development of the software protection concept. The goal of software licensing is to allow software users to use software according to purchased licenses, involving the number of installations, usage time, application scope, and functional modules. The emergence of software licensing technology, especially cloud licensing technology, has solved the needs of software developers for digital, automated, and manageable software sales, and is a prime example of the integration of software licensing technology and "Internet+". Building upon software protection technology, software licensing can provide a complete solution from software license design, development integration, and debugging to software license generation, distribution, and management. The transition from traditional software protection to software licensing is not only an inevitable result of the development of software protection technology in the Internet era, but also a strong desire of developers to reduce the costs of software protection, distribution, management, and maintenance, and to respond more quickly to user needs and market changes. Traditional software licensing technology often requires binding the physical hardware information of each node in a cluster to generate an application code, then generating an authorization code according to a logically designed algorithm. During software use, the authorization code is decoded to obtain authorization information. This authorization technology, which binds to physical hardware information, can cause changes in the application code when cluster information changes, such as IP address changes, hard drive replacement, or node addition. This can lead to problems where the authorization code cannot be correctly verified after decoding. Summary of the Invention
[0003] This disclosure provides a software licensing method, apparatus, device, and medium based on a distributed cluster.
[0004] According to a first aspect of this disclosure, a software licensing method based on a distributed cluster is provided. The method includes:
[0005] Receive the application code generation request from the current client and obtain the authorization file and application file;
[0006] In response to the absence of the authorization document and application document, a first application code is generated based on a preset algorithm;
[0007] The first application code is encrypted and salted to obtain the first ciphertext;
[0008] The first ciphertext is returned to the current client.
[0009] Furthermore, the first application code includes a second application code and a third application code, wherein the second application code is stored in a container and the third application code is stored in a database.
[0010] Furthermore, the generation of the first application code based on the preset algorithm includes:
[0011] Obtain the second application code and the third application code; wherein the second application code is generated in the container based on a preset algorithm, and the third application code is generated in the database based on a preset algorithm;
[0012] The first application code is generated based on the second application code and the third application code.
[0013] Further, the encryption and salting process of the first application code to obtain the first ciphertext includes:
[0014] Get the application time;
[0015] Based on the application time and a preset salt value, an encryption function is invoked to encrypt the first application code, resulting in the first ciphertext; wherein, the encryption function is any function used for encryption in a preset encryption / decryption algorithm library.
[0016] Furthermore, the method also includes:
[0017] Determine if the current node is an edge node;
[0018] If the current node is an edge node, a fourth application code is generated based on a preset algorithm;
[0019] The fourth application code and the first ciphertext are encrypted and salted to obtain the second ciphertext.
[0020] Furthermore, the method also includes:
[0021] Receive an authorization verification request; the authorization verification request is obtained by the interceptor intercepting requests to the system software interface; the authorization verification request includes a third ciphertext;
[0022] The third ciphertext is decoded by calling a decryption function from a preset encryption / decryption algorithm library to obtain authorization information; wherein, the decryption function is a function used for decryption corresponding to the encryption function;
[0023] Authorization verification is performed based on the aforementioned authorization information.
[0024] Further, the authorization information includes a first authorization code, a second authorization code, and an authorization time, and the authorization verification based on the authorization information includes:
[0025] Compare the first authorization code with the fourth application code;
[0026] If the first authorization code matches the fourth application code, then the second authorization code is compared with the first application code.
[0027] If the second authorization code matches the first application code, then the authorization time is compared with the application time.
[0028] If the authorization time falls within the application time range, an authorization pass instruction is generated to allow the interceptor to pass the authorization verification request.
[0029] According to a second aspect of this disclosure, a software licensing apparatus based on a distributed cluster is provided. The apparatus includes:
[0030] The information receiving module is used to receive the application code generation request from the current client and obtain the authorization file and application file;
[0031] The query module is used in response to the absence of the authorization document and application document;
[0032] The application code generation module is used to generate the first application code based on a preset algorithm.
[0033] The encryption module is used to encrypt and salt the first application code to obtain the first ciphertext;
[0034] The sending module is used to return the first ciphertext to the current client.
[0035] According to a third aspect of this disclosure, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.
[0036] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method as described in the first aspect of this disclosure.
[0037] The software licensing method, apparatus, device, and medium based on a distributed cluster provided in this disclosure generate application codes for nodes based on application codes stored separately in containers and databases, and encrypt and transmit the application codes to ensure their security. This provides a more secure and reliable software licensing method adaptable to complex and ever-changing cluster information environments by utilizing the distributed storage of software application codes and the corresponding combination of application codes in a fully containerized, compute-storage separated environment. Furthermore, for the nodes involved in the distributed cluster, application codes are generated in a corresponding manner according to the node hierarchy, enabling step-by-step verification of multi-level nodes during authorization verification, thereby improving the security and reliability of authorization verification.
[0038] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0039] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0040] Figure 1 A flowchart of a software licensing method based on a distributed cluster according to an embodiment of the present disclosure is shown;
[0041] Figure 2 A flowchart of a software licensing method based on a distributed cluster according to yet another embodiment of the present disclosure is shown;
[0042] Figure 3 A flowchart of a software licensing method based on a distributed cluster according to yet another embodiment of the present disclosure is shown;
[0043] Figure 4 A flowchart of a software licensing method based on a distributed cluster according to yet another embodiment of the present disclosure is shown;
[0044] Figure 5 A block diagram of a software licensing apparatus based on a distributed cluster according to an embodiment of the present disclosure is shown;
[0045] Figure 6 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0047] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0048] This disclosure relates to a software authorization method suitable for a distributed container cluster environment, including a data center server, a central node, and edge nodes. The central node is responsible for the authorization verification of the edge nodes and then sends its own authorization code and the authorization codes of the edge nodes to the data center server, which then completes the authorization verification of the central node and the edge nodes. Alternatively, the central node can uniformly send its own authorization code and the authorization codes of the edge nodes to the data center server, which then completes the authorization verification of the central node and the edge nodes.
[0049] Figure 1 A flowchart of a software licensing method 100 based on a distributed cluster according to an embodiment of the present disclosure is shown. Method 100 includes:
[0050] Step 110: Receive the application code generation request from the current client and obtain the authorization file and application file.
[0051] In some embodiments, when a client requests the generation of an application code, the function code for generating the application code is invoked. This function calls the license file lookup path in the file system, such as ` / etc / licence / .lc`, to check if an license file already exists. If an license file already exists, it indicates that an license code has already been generated and has not expired; an updated license code is then returned to the client. If no license file exists, the function further checks if an application file exists by calling the application file lookup path in the file system, such as ` / etc / licence / .rc`. If an application file already exists, it indicates that an application code already exists, and no new application code needs to be generated. Furthermore, license files are stored for expiration based on their license time. When the license time expires, the license file automatically becomes invalid; that is, calling the corresponding function to check if a license file exists will not find the corresponding license file lookup path. Similarly, the same applies to the storage of application files for expiration. The data center server promptly cleans up and updates the data for expired license files and application files. This ensures authorization security without excessively consuming system memory, reducing system load and improving operating efficiency.
[0052] Step 120: In response to the absence of the authorization document and application document, a first application code is generated based on a preset algorithm.
[0053] In some embodiments, during the processing of step 110, when the authorization file and application file do not exist, the system needs to generate a new application code. The first application code includes a second application code and a third application code. The second application code is generated in a container based on a preset algorithm, and the third application code is generated in a database based on a preset algorithm. For example, the second application code is generated in the container based on the preset algorithm: 991be53e-574e-4d4c-bdee-f92542a2bc98, and the third application code is generated in the database based on the preset algorithm: 314763dc-1b96-46fe-aa2d-b01e830f6f83. Then, the second and third application codes are concatenated to obtain the first application code: 991be53e-574e-4d4c-bdee-f92542a2bc98@314763dc-1b96-46fe-aa2d-b01e830f6f83. The preset algorithm can be customized by operators based on experience, or it can be a random algorithm that generates the application code randomly according to the set rules. The rules for combining the two parts of the application code can be concatenation, intersection, position replacement, etc., and are not limited to the examples above. Therefore, by distributing the application codes—part in the container and part in the database—the application codes are not bound to any physical cluster information. When cluster information changes, such as IP address changes, hard drive replacements, node additions, or cluster expansion and maintenance operations, it will not affect the application codes, nor will it cause changes to the application codes, and there will be no problem with correct verification after decoding the authorization codes. Furthermore, since the persistent files of both the application codes and authorization codes are stored in the storage and database of the container where the authorization service runs, horizontal scaling is supported.
[0054] Step 130: Encrypt and salt the first application code to obtain the first ciphertext.
[0055] In some embodiments, to securely transmit the application code generated in step 120 to the client, it needs to be encrypted: The application time is obtained; based on the application time and a preset salt value, an encryption function is called to encrypt the first application code, obtaining the first ciphertext; wherein, the encryption function is any encryption function in a preset encryption / decryption algorithm library. The application time includes the application start time and the application end time. For example, calling any encryption function in the preset encryption / decryption algorithm library, such as the RSA encryption function, and using the preset salt value GEOVIS.WISDOM.ZHCXYJY, the application start time 2023-02-10, and the application end time 2023-02-12, encrypts the first application code: 991be53e-574e-4d4c-bdee-f92542a2bc98@314763dc-1b96-46fe-aa2d-b01e830f6f83, to obtain the first ciphertext.
[0056] RjtRJ5w2mwE18ckWvw8xmzowJTwO7PVm7iQIfO3 / WpQthG9B4E7RPS5KYo3w4rS9Cy6EAO+1r6W2eAZQdXp7vvxhZ1uBprYrPV+T9J8b+UNaAu+mPR VeHubwuvp0US+b2JQ6AtkNb+41WoLSlyt7Wn5FZdq5 / dBVkbH14wzd7ZIo7qVLud2JFRuXvGoPsTfI8 / ernnemlCyxKBVEiHl9FZN5LWQjFs1vpeDD / XRmG GVbSEQd4 / YZxZ3YQYFCbukmVyanGDmUHH8DZARcjCjaZY40tbpjH7XNh fK5wvBz26YY4 / zEeI+fjPDu2sskhfDgtDqanYfLLtn244+FdA8 / ug==。 It should be noted that the encryption function here is not limited to the examples above.
[0057] Step 140: Return the first ciphertext to the current client.
[0058] In some embodiments, the encrypted application code obtained in step 130 is sent to the client to complete the application code generation request of the software.
[0059] According to the software licensing method, apparatus, device, and medium based on a distributed cluster provided in the above embodiments, application codes for nodes are generated based on application codes stored separately in containers and databases, and the application codes are encrypted and transmitted to ensure their security. This provides a more secure and reliable software licensing method adaptable to complex and ever-changing cluster information environments by utilizing the distributed storage of software application codes and the corresponding combination of application codes in a fully containerized, storage-compute-separated environment. Furthermore, for the nodes involved in the distributed cluster, application codes are generated in a corresponding manner according to the node hierarchy, so that multi-level node verification can be implemented during authorization verification, thereby improving the security and reliability of authorization verification.
[0060] Based on the above embodiments, in yet another embodiment provided in this disclosure, as shown below... Figure 2 The flowchart shown below illustrates the edge node application code generation process. Method 200 includes the following steps:
[0061] Step 210: Determine whether the current node is an edge node.
[0062] Step 220: In response to the fact that the current node is an edge node, a fourth application code is generated based on a preset algorithm.
[0063] Step 230: Encrypt and salt the fourth application code and the first ciphertext to obtain the second ciphertext.
[0064] In some embodiments, based on a central node and edge nodes in a distributed cluster environment, the generation of application codes for both the central node and edge nodes can be implemented using the method 100 described above. Furthermore, if the node is an edge node, the application code can be generated using method 200. For example, during the generation of the application code, if the current node is an edge node, the first ciphertext of the central node is generated first, then the application code of the edge node is generated based on the first ciphertext, and finally, the application code of the edge node is encrypted and salted.
[0065] Based on the above embodiments, in yet another embodiment provided in this disclosure, as shown below... Figure 3 The authorization verification flowchart shown includes the following steps:
[0066] Step 310: Receive authorization verification request.
[0067] The authorization verification request is obtained by the interceptor intercepting requests to the system software interface; the authorization verification request includes a third ciphertext.
[0068] Step 320: Call the decryption function in the preset encryption / decryption algorithm library to decode the third ciphertext and obtain the authorization information.
[0069] The decryption function is the function used for decryption that corresponds to the encryption function.
[0070] Step 330: Perform authorization verification based on the authorization information.
[0071] In some embodiments, an interceptor intercepts the authorization code of the software interface, then calls a decryption function from a preset encryption / decryption algorithm library to decode the intercepted authorization code, and then performs authorization verification based on the decrypted authorization information. The authorization verification process can be performed by a central node first verifying the authorization of edge nodes, and then by a data center server. The data center server's authorization verification can either verify both the central and edge nodes, or it can verify only the central node.
[0072] Based on the above embodiments, in yet another embodiment provided in this disclosure, as shown below... Figure 4 The authorization verification flowchart shown illustrates that the data center server performs authorization verification on both the central node and the edge node, specifically including the following steps:
[0073] Step 410: Compare the first authorization code with the fourth application code.
[0074] Step 420: In response to the first authorization code matching the fourth application code, the second authorization code is compared with the first application code.
[0075] Step 430: In response to the second authorization code matching the first application code, the authorization time is compared with the application time.
[0076] Step 440: In response to the authorization time being within the application time range, an authorization pass instruction is generated to instruct the interceptor to allow the authorization verification request.
[0077] In some embodiments, when a unique application code is automatically generated and the authorization service is deployed across multiple instances, the authorization verification service can still be provided normally even if several nodes fail. The data center server completes the authorization verification for the central node and edge nodes. The authorization information obtained in step 330 includes a first authorization code, a second authorization code, and an authorization time. The first authorization code is compared with the fourth application code, and the second authorization code is compared with the first application code. If the comparison results are consistent, it indicates that the authorization code verification is correct. At this point, it is necessary to further verify whether the authorization time is correct. If the authorization time is within the time limit, the verification is successful.
[0078] In some embodiments, the authorization verification process can proceed as follows: first, the central node verifies the authorization of the edge nodes; then, the data center server verifies the authorization of both the central node and the edge nodes. Alternatively, the central node can verify the authorization of the edge nodes first, then the data center server verifies the authorization of the central node. The authorization verification process for the central node includes: comparing the first authorization code with the fourth application code and verifying that the authorization time is within the specified time limit. The verification process for the central node by the data center server includes: comparing the second authorization code with the first application code and verifying that the authorization time is within the specified time limit. Similarly, if the application codes for both the central node and the edge nodes are generated according to method 100 described above, different verification methods can be used, which will not be elaborated here. Therefore, operators can customize the system settings to use one or more of the above verification methods in combination to improve the flexibility and security of authorization verification.
[0079] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this disclosure.
[0080] The above is an introduction to the method embodiments. The following describes the solution described in this disclosure further through device embodiments.
[0081] Figure 5 A block diagram of a distributed cluster-based software licensing apparatus 500 according to an embodiment of the present disclosure is shown. Figure 5 As shown, the device 500 includes:
[0082] The information receiving module 510 is used to receive the application code generation request from the current client and obtain the authorization file and application file;
[0083] The application code generation module 520 is used to generate a first application code based on a preset algorithm in response to the absence of the authorization file and the application file.
[0084] The encryption module 530 is used to encrypt and salt the first application code to obtain the first ciphertext;
[0085] The sending module 540 is used to return the first ciphertext to the current client.
[0086] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0087] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0088] Figure 6 A schematic block diagram of an electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0089] Device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0090] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as method 100 and / or method 200. For example, in some embodiments, method 100 and / or method 200 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of method 100 and / or method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform method 100 and / or method 200 by any other suitable means (e.g., by means of firmware).
[0092] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0093] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0094] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0096] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0097] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0098] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0099] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A software licensing method based on a distributed cluster, applied to a server, characterized in that, include: Receive the application code generation request from the current client and obtain the authorization file and application file; In response to the absence of the authorization document and application document, a first application code is generated based on a preset algorithm; the first application code includes a second application code and a third application code, wherein the second application code is stored in a container and the third application code is stored in a database; The generation of the first application code based on the preset algorithm includes: Obtain the second application code and the third application code; wherein the second application code is generated in the container based on a preset algorithm, and the third application code is generated in the database based on a preset algorithm; The first application code is generated based on the second application code and the third application code; the first application code is encrypted and salted to obtain the first ciphertext; Return the first ciphertext to the current client; The method further includes: Determine if the current node is an edge node; If the current node is an edge node, a fourth application code is generated based on a preset algorithm; The fourth application code and the first ciphertext are encrypted and salted to obtain the second ciphertext; Receive an authorization verification request; the authorization verification request is obtained by the interceptor intercepting requests to the system software interface; the authorization verification request includes a third ciphertext; The third ciphertext is decoded by calling a decryption function from a preset encryption / decryption algorithm library to obtain authorization information; wherein, the decryption function is a function used for decryption corresponding to the encryption function; Authorization verification is performed based on the aforementioned authorization information; The authorization information includes a first authorization code, a second authorization code, and an authorization time. The authorization verification based on the authorization information includes: Compare the first authorization code with the fourth application code; If the first authorization code matches the fourth application code, then the second authorization code is compared with the first application code. If the second authorization code matches the first application code, then the authorization time is compared with the application time. If the authorization time falls within the application time range, an authorization pass instruction is generated to allow the interceptor to pass the authorization verification request.
2. The method according to claim 1, characterized in that, The encryption and salting process of the first application code to obtain the first ciphertext includes: Get the application time; Based on the application time and a preset salt value, an encryption function is invoked to encrypt the first application code, resulting in the first ciphertext; wherein, the encryption function is any function used for encryption in a preset encryption / decryption algorithm library.
3. A software licensing device based on a distributed cluster, executing the method as described in any one of claims 1-2, characterized in that, include: The information receiving module is used to receive the application code generation request from the current client and obtain the authorization file and application file; The application code generation module is used to generate a first application code based on a preset algorithm in response to the absence of the authorization file and the application file. The encryption module is used to encrypt and salt the first application code to obtain the first ciphertext; The sending module is used to return the first ciphertext to the current client.
4. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1-2.
5. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-2.
Citation Information
Patent Citations
License authorization control method, device, terminal, and storage medium
CN109460639A