A program deployment method and device

By combining containerized management and licensing in project program deployment, licenses are generated and verified, the problems of inefficient deployment and pirated software are solved, and efficient deployment and copyright management are achieved.

CN112596740BActive Publication Date: 2024-12-17BEIJING SUREKAM CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011595041.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-12-17
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

During project program deployment, the prior art leads to high deployment time and labor costs and is prone to problems with pirated software, especially when migrating and copying projects between different environments.

Method used

By placing the project program in a container and running it in combination with licensing and authorization management, using containerized management and licensing to generate and verify licenses, we ensure that the project program runs in an authorized environment.

Benefits of technology

It reduces the coupling between project programs and machine environment, reduces the deployment workload of operation and maintenance personnel, improves deployment efficiency, and effectively prevents the project from being copied to other machines for use, avoiding the proliferation of pirated software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112596740B_ABST
    Figure CN112596740B_ABST
Patent Text Reader

Abstract

The present invention discloses a program deployment method and device, the method comprising: obtaining a configuration file for creating a container and creating a container, wherein a project program is installed in the container; starting the container to run the project program; sending a license application containing user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information; receiving a license certificate from the authorization server, so that when the project program receives an access request, the license certificate is called for verification, and the access request is processed after the verification is successful. By combining containerized management and license authorization, that is, the project program is carried in a container for operation, so as to reduce the coupling between the project program and the machine environment, reduce the deployment workload of the operation and maintenance personnel, and improve efficiency, and manage the use of the project program through license authorization, it is possible to prevent the deployed project from being copied to other machines for use by multiple users, thereby avoiding the problem of rampant pirated software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a program deployment method and device. Background Art

[0002] At present, when deploying project programs, it is often necessary to install some components that the project depends on according to the environment of the user's server, or when the project needs to be migrated to a new environment, the project program needs to be deployed according to the new environment. This will cost deployment time and manpower costs. Some users will even copy the deployed project to other machines for multiple users to use, which will lead to the problem of rampant pirated software. Summary of the invention

[0003] The purpose of the present invention is to propose a program deployment method and device to address the deficiencies of the above-mentioned prior art, and this purpose is achieved through the following technical solutions.

[0004] A first aspect of the present invention provides a program deployment method, which is applied to a user server and includes:

[0005] Obtaining a configuration file for creating a container, and creating a container according to the configuration file, wherein the project program is installed in the container;

[0006] Starting the container to run the project program;

[0007] Sending a license application including user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information;

[0008] The license certificate from the authorization server is received and stored, so that when the project program receives an access request, the license certificate is called for verification, and the access request is processed after the verification is successful.

[0009] A second aspect of the present invention provides a program deployment method, which is applied to an authorization server and includes:

[0010] Receiving a license application sent by a user server, wherein the license application includes user server information;

[0011] Check whether the user server information exists in the preset authorization configuration table;

[0012] If yes, generate a license certificate using the user server information, and encrypt the license certificate using the private key stored locally;

[0013] The encrypted license certificate is sent to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, the license certificate is called for verification, and the access request is processed after the verification is successful.

[0014] A third aspect of the present invention provides a program deployment device, which is applied to a user server and includes:

[0015] A deployment container module is used to obtain a configuration file for creating a container and create a container according to the configuration file, wherein the project program is installed in the container;

[0016] A start container module is used to start the container to run the project program;

[0017] An authorization application module, used for sending a license application including the user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information;

[0018] The receiving module is used to receive and store the license certificate from the authorization server, so that when the project program receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

[0019] A fourth aspect of the present invention provides a program deployment device, which is applied to an authorization server and includes:

[0020] A receiving module, used for receiving a license application sent by a user server, wherein the license application includes user server information;

[0021] A query module, used to query whether the user server information exists in a preset authorization configuration table;

[0022] A certificate generation module, used to generate a license certificate using the user server information when the user server information is queried, and encrypt the license certificate using a locally stored private key;

[0023] The certificate sending module is used to send the encrypted license certificate to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

[0024] A fifth aspect of the present invention provides a machine-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0025] Based on the program deployment method and device described in the first to fourth aspects above, the present invention has the following beneficial effects:

[0026] By combining container management and licensing authorization, that is, running project programs in containers, the coupling between project programs and machine environments can be reduced, the deployment workload of operation and maintenance personnel can be reduced, and deployment efficiency can be improved. In addition, the use of project programs is managed through licensing authorization, which can prevent the deployed projects from being copied to other machines for multiple users to use, thus avoiding the problem of rampant pirated software. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 This is a flow chart of an embodiment of a program deployment method according to an exemplary embodiment of the present invention;

[0029] Figure 2 This is a flow chart of another program deployment method according to an exemplary embodiment of the present invention;

[0030] Figure 3 A hardware structure diagram of a server according to an exemplary embodiment of the present invention;

[0031] Figure 4 It is a structural schematic diagram of a program deployment device according to an exemplary embodiment of the present invention;

[0032] Figure 5 The figure is a schematic diagram of the structure of another program deployment device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0033] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0034] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0035] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0036] In the present invention, in order to solve the problems of inconsistent deployment environment, low deployment efficiency, and software copyright theft, an improved program deployment method is proposed. By combining containerized management and license authorization, the project program is carried in a container to run, so as to reduce the coupling between the project program and the machine environment, reduce the deployment workload of operation and maintenance personnel, and improve deployment efficiency. In addition, the use of project programs is managed by licensing authorization, which can prevent the deployed projects from being copied to other machines for use by multiple users, thereby avoiding the problem of rampant pirated software.

[0037] The program deployment method proposed by the present invention is described in detail below with reference to specific embodiments.

[0038] Embodiment 1:

[0039] Figure 1 FIG. 1 is a flow chart of an embodiment of a program deployment method according to an exemplary embodiment of the present invention. The program deployment method is applied on a user server, and the user server is used to deploy project programs, such as Figure 1 As shown, the program deployment method includes the following steps:

[0040] Step 101: Obtain a configuration file for creating a container, and create a container according to the configuration file, wherein a project program is installed in the container.

[0041] The configuration file may be in yaml format, and the configuration file may record information such as memory, environment variables, and health checks for controlling the container. The configuration file may specify the image file corresponding to the started container. Different image files may enable the started container to achieve different functions.

[0042] It is worth noting that the configuration file also defines the project program's installation package and the program's configuration file. Therefore, after creating a container based on the configuration file, the project program is also installed in the container.

[0043] The configuration file of the program records the configuration information required for the project program to run, such as the public key for decrypting the license certificate, the storage directory of the license certificate, the address of the authorization server, and other information.

[0044] Step 102: Start the container to run the project program.

[0045] Among them, the container is started by executing the container start command. After the container is started, the project program in the container is also started.

[0046] Step 103: Send a license application including the user server information to the authorization server through the project program, so that the authorization server generates a license certificate according to the user server information.

[0047] The user server information may include an IP (Internet Protocol Address) address, a MAC (Media Access Control Address) address, a motherboard serial number, a CPU (Central Processing Unit) serial number, and other information.

[0048] In one embodiment, by setting a listener in the project program, before the project program sends a license application to the authorization server, the listener in the project program can determine whether there is a valid license certificate on the user server. If not, the process of step 103 is executed.

[0049] The specific judgment process may include: first, determine whether a license is stored in the storage directory in the program configuration file; if so, determine whether the license is expired based on the current system time; if not, determine whether the device information contained in the license is the user server information; if so, determine that a valid license exists on the user server; if no license exists or the license is expired or the device information contained in the license is not the user server information, determine that no valid license exists on the user server.

[0050] It should be noted that the license generated by the authorization server according to the user server information records the device information (ie, the user server information), validity period information, etc. The validity period information refers to the length of time that the project program on the user server can be used.

[0051] Step 104: Receive and store the license certificate from the authorization server so that the project program can call the license certificate for verification when receiving an access request, and process the access request after the verification is successful.

[0052] Among them, based on the information contained in the program configuration file described in the above step 101, it can be known that the license certificate received by the user server is stored in the storage directory recorded in the program configuration file, so that each time the project program receives an access request, it calls the license certificate in the storage directory for verification. The access request is processed only after the verification is successful. If the verification fails, any access to the project program will be blocked, effectively avoiding the problem of rampant pirated software.

[0053] It should be noted that, for the process of calling the license certificate for verification when the project program receives an access request, the principle of judging the valid license certificate described in the above step 103 can be adopted, that is, the project program judges whether there is a license certificate locally on the user server. If so, it judges whether the license certificate is expired based on the current system time. If not, it continues to judge whether the device information contained in the license certificate is the user server information. If so, it is determined that the verification is successful. If there is no license certificate or the license certificate is expired or the device information contained in the license certificate is not the user server information, it is determined that the verification has failed.

[0054] Since the license certificate includes validity period information, the current system time can be compared with the validity period information. If the current system time is within the validity period information range, it means that the license certificate has not expired.

[0055] It should be further explained that in order to ensure the security of the license certificate, the license certificate stored on the user server is encrypted. Therefore, before determining whether the license certificate has expired based on the current system time, the project program needs to obtain the program configuration file stored in the container and use the public key in the program configuration file to decrypt the license certificate.

[0056] At this point, the above Figure 1 The process shown above Figure 1 The deployment process shown combines container management with license authorization, that is, the project program is run in a container to reduce the coupling between the project program and the machine environment, reduce the deployment workload of operation and maintenance personnel, and improve deployment efficiency. In addition, the use of project programs is managed by license authorization, which can prevent the deployed project from being copied to other machines for use by multiple users, thereby avoiding the problem of rampant pirated software.

[0057] Embodiment 2:

[0058] Figure 2FIG. 1 is a flow chart of another program deployment method according to an exemplary embodiment of the present invention. The program deployment method is applied on an authorization server, and the authorization server is used to generate a license certificate for a user server. Figure 1 Based on the embodiment shown, Figure 2 As shown, the program deployment method includes the following steps:

[0059] Step 201: receiving a permission application sent by a user server, wherein the permission application includes user server information.

[0060] The user server information includes information such as ip (Internet Protocol Address, Internet Protocol) address, mac (Media Access Control Address, Media Access Control Address) address, motherboard serial number, cpu (Central Processing Unit, Central Processing Unit) serial number, etc.

[0061] Step 202: Check whether the user server information exists in the preset authorization configuration table. If yes, execute step 203; if not, end the current process.

[0062] Among them, the authorization configuration table records the device information that is allowed to use the project program copyright.

[0063] Step 203: Generate a license certificate using the user server information, and encrypt the license certificate using the private key stored locally.

[0064] In one embodiment, in the process of generating a license certificate using user server information, pre-configured certificate validity period information may be obtained first, and then the license certificate may be generated using the user server information and the certificate validity period information.

[0065] The generated license contains information about the user's server, validity period, etc. To ensure the security of the license, the license needs to be encrypted using a private key generated locally in advance.

[0066] Exemplarily, a private key may include the key algorithm, the key password, and owner information (first and last name, organizational unit name, organization name, city or region name, state or province name, two-letter country code of the unit).

[0067] Step 204: Send the encrypted license certificate to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

[0068] At this point, the above Figure 2 The process shown above Figure 2 The deployment process shown combines container management and license authorization, that is, the project program is run in a container to reduce the coupling between the project program and the machine environment, reduce the deployment workload of operation and maintenance personnel, and improve deployment efficiency. In addition, the use of the project program is managed by the license authorization method of the authorization server, which can prevent the deployed project from being copied to other machines for use by multiple users, thereby avoiding the problem of rampant pirated software.

[0069] Figure 3 This is a hardware structure diagram of a server according to an exemplary embodiment of the present invention, wherein the server includes: a communication interface 401, a processor 402, a machine-readable storage medium 403 and a bus 404; wherein the communication interface 401, the processor 402 and the machine-readable storage medium 403 communicate with each other via the bus 404.

[0070] When the server is a user server, the processor 402 reads and executes the above-mentioned Figure 1 The control logic of the program deployment method shown in the figure corresponds to the machine executable instructions. For details of the method, see Figure 1 The illustrated embodiments will not be described again here.

[0071] When the server is an authorized server, the processor 402 reads and executes the machine-readable storage medium 403 corresponding to the above Figure 2 The control logic of the program deployment method shown in the figure corresponds to the machine executable instructions. For details of the method, see Figure 2 The illustrated embodiments will not be described again here.

[0072] The machine-readable storage medium 403 mentioned in the present invention can be any electronic, magnetic, optical or other physical storage device, which can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: volatile memory, non-volatile memory or similar storage medium. Specifically, the machine-readable storage medium 403 can be RAM (Random Access Memory), flash memory, storage drive (such as hard disk drive), any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0073] Corresponding to the above-mentioned embodiment of the program deployment method, the present invention also provides an embodiment of a program deployment device.

[0074] Figure 4 FIG. 1 is a flow chart of an embodiment of a program deployment device according to an exemplary embodiment of the present invention. The program deployment device is applied to a user server, such as Figure 4 As shown, the program deployment device includes:

[0075] A deployment container module 410 is used to obtain a configuration file for creating a container, and create a container according to the configuration file, wherein the project program is installed in the container;

[0076] A start container module 420 is used to start the container to run the project program;

[0077] An application authorization module 430 is used to send a license application including the user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information;

[0078] The receiving module 440 is used to receive and store the license certificate from the authorization server, so that when the project program receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

[0079] In an optional implementation, the receiving module 440 is specifically used to call the license certificate for verification when the project program receives an access request. The project program determines whether there is a license certificate locally on the user server; if so, determines whether the license certificate is expired based on the current system time; if not, determines whether the device information contained in the license certificate is the user server information; if so, determines that the verification is successful; if there is no license certificate or the license certificate is expired or the device information contained in the license certificate is not the user server information, determines that the verification has failed.

[0080] In an optional implementation, the device further includes:

[0081] The decryption module is used for the project program to obtain the program configuration file stored in the container and decrypt the license certificate using the public key in the program configuration file before the receiving module 440 determines whether the license certificate has expired according to the current system time.

[0082] Figure 5 FIG. 1 is a flow chart of another embodiment of a program deployment device according to an exemplary embodiment of the present invention. The program deployment device is applied to an authorization server, such as Figure 5 As shown, the program deployment device includes:

[0083] The receiving module 510 is used to receive a permission application sent by a user server, wherein the permission application includes user server information;

[0084] A query module 520, used to query whether the user server information exists in a preset authorization configuration table;

[0085] The certificate generation module 530 is used to generate a license certificate using the user server information when the user server information is queried, and encrypt the license certificate using the private key stored locally;

[0086] The certificate sending module 540 is used to send the encrypted license certificate to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

[0087] In an optional implementation, the certificate generation module 530 is specifically used to obtain pre-configured certificate validity period information during the process of generating a license certificate using the user server information; and generate a license certificate using the user server information and the certificate validity period information.

[0088] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0089] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0090] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed by the present invention. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.

[0091] 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.

[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A program deployment method, It is characterized in that The method is applied to a user server, and comprises: Obtaining a configuration file for creating a container, and creating a container according to the configuration file, wherein the project program is installed in the container; Starting the container to run the project program; Sending a license application including user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information; Receive a license certificate from the authorization server, and store the license certificate in a configuration file of the project program defined by the configuration file, so that when the project program receives an access request, it calls the license certificate for verification, and processes the access request after the verification is successful.

2. The method according to claim 1, It is characterized in that When the project program receives the access request, it calls the license certificate for verification, including: The project program determines whether a license certificate exists locally on the user server; If it exists, determine whether the license certificate has expired according to the current system time; If it is not expired, determining whether the device information included in the license certificate is the user server information; If so, it is determined that the verification is successful; If the license certificate does not exist or is expired, or the device information included in the license certificate is not the user server information, it is determined that the verification has failed.

3. The method according to claim 2, It is characterized in that Before determining whether the license certificate is expired according to the current system time, including: The project program obtains the program configuration file stored in the container, and decrypts the license certificate using the public key in the program configuration file.

4. A program deployment method, It is characterized in that The method is applied to an authorization server, and the method comprises: Receiving a license application sent by a user server, wherein the license application includes user server information; Check whether the user server information exists in the preset authorization configuration table; If yes, generate a license certificate using the user server information, and encrypt the license certificate using the private key stored locally; The encrypted license certificate is sent to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, the license certificate is called for verification, and the access request is processed after the verification is successful.

5. The method according to claim 4, It is characterized in that The step of generating a license certificate by using the user server information includes: Get pre-configured certificate validity information; A license certificate is generated using the user server information and the certificate validity period information.

6. A program deployment device, It is characterized in that The device is applied to a user server, and comprises: A deployment container module is used to obtain a configuration file for creating a container and create a container according to the configuration file, wherein the project program is installed in the container; A start container module is used to start the container to run the project program; An authorization application module, used for sending a license application including the user server information to an authorization server through the project program, so that the authorization server generates a license certificate according to the user server information; The receiving module is used to receive and store the license certificate from the authorization server, so that when the project program receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

7. The device according to claim 6, It is characterized in that The receiving module is specifically used to call the license certificate for verification when the project program receives the access request, and the project program determines whether the license certificate exists locally on the user server; If it exists, determine whether the license certificate has expired according to the current system time; If the license is not expired, determining whether the device information included in the license is the user server information; If so, it is determined that the verification is successful; if the license certificate does not exist or the license certificate is expired or the device information included in the license certificate is not the information of the user server, it is determined that the verification has failed.

8. A program deployment device, It is characterized in that The device is applied to an authorization server, and the device includes: A receiving module, used for receiving a license application sent by a user server, wherein the license application includes user server information; A query module, used to query whether the user server information exists in a preset authorization configuration table; A certificate generation module, used to generate a license certificate using the user server information when the user server information is queried, and encrypt the license certificate using a locally stored private key; The certificate sending module is used to send the encrypted license certificate to the user server corresponding to the user server information, so that when the project program running in the container of the user server receives an access request, it calls the license certificate for verification and processes the access request after the verification is successful.

9. The device according to claim 8, It is characterized in that The certificate generation module is specifically used to obtain pre-configured certificate validity period information during the process of generating a license certificate using the user server information; and generate a license certificate using the user server information and the certificate validity period information.

10. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the program deployment method according to any one of claims 1 to 3 or claims 4 to 5.

Citation Information

Patent Citations

  • Container generation method, device and system, terminal and server

    CN107797807A

  • Software protection system and method

    CN108664771A